Skip to content

CORSOptions

Defined in: types.ts:21

CORS configuration options

optional allowedHeaders: string | string[]

Defined in: types.ts:35

Allowed headers (default: ‘Content-Type, Authorization’)


optional credentials: boolean

Defined in: types.ts:45

Allow credentials (default: true)


optional exposedHeaders: string | string[]

Defined in: types.ts:40

Exposed headers


optional maxAge: number

Defined in: types.ts:50

Max age for preflight cache in seconds (default: 86400)


optional methods: string | string[]

Defined in: types.ts:30

Allowed HTTP methods (default: ‘GET, POST, OPTIONS’)


optional origin: string | string[] | (origin) => boolean

Defined in: types.ts:25

Allowed origins (default: ‘*’)