Skip to content

CorsOptions

Defined in: src/server/cors.ts:12

CORS configuration for the panel handler.

Property Type Description Defined in
credentials? boolean Send Access-Control-Allow-Credentials: true (needed for cookie auth). Default false. src/server/cors.ts:21
headers? string[] Allowed request headers advertised in preflight. Default: reflect the request’s Access-Control-Request-Headers, falling back to Content-Type, Authorization. src/server/cors.ts:29
maxAge? number Access-Control-Max-Age (seconds) for the preflight cache. src/server/cors.ts:31
methods? string[] Allowed methods advertised in preflight. Default GET,HEAD,PUT,POST,DELETE,PATCH,OPTIONS. src/server/cors.ts:23
origin string | string[] | ((origin) => boolean) Allowed origin(s): a single origin ("https://app.example.com"), "*", a list, or a predicate (origin) => boolean. With credentials: true, "*" is echoed back as the caller’s exact origin (the browser forbids * + credentials). src/server/cors.ts:19