Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/core/src/actor/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
} from "./config";
import { ActorDefinition } from "./definition";


export function actor<
S,
CP,
Expand Down Expand Up @@ -43,3 +42,4 @@ export type {
ActorContextOf,
ActionContextOf,
} from "./definition";
export { ALLOWED_PUBLIC_HEADERS} from "./router-endpoints";
4 changes: 3 additions & 1 deletion packages/core/src/actor/router-endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,9 @@ export const HEADER_CONN_TOKEN = "X-RivetKit-Conn-Token";
*
* Used for CORS.
**/
export const ALL_PUBLIC_HEADERS = [
export const ALLOWED_PUBLIC_HEADERS = [
"Content-Type",
"User-Agent",
HEADER_ACTOR_QUERY,
HEADER_ENCODING,
HEADER_CONN_PARAMS,
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/manager/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { Transport } from "@/actor/protocol/message/mod";
import type { ToClient } from "@/actor/protocol/message/to-client";
import { type Encoding, serialize } from "@/actor/protocol/serde";
import {
ALL_PUBLIC_HEADERS,
ALLOWED_PUBLIC_HEADERS,
HEADER_ACTOR_ID,
HEADER_ACTOR_QUERY,
HEADER_AUTH_DATA,
Expand Down Expand Up @@ -137,7 +137,7 @@ export function createManagerRouter(
...corsConfig,
allowHeaders: [
...(corsConfig?.allowHeaders ?? []),
...ALL_PUBLIC_HEADERS,
...ALLOWED_PUBLIC_HEADERS,
"Content-Type",
"User-Agent",
],
Expand Down
Loading