Skip to content

CorsOptions

Defined in: src/plugins/middleware/cors.ts:4

optional allowedHeaders: string | string[]

Defined in: src/plugins/middleware/cors.ts:16

HTTP headers to allow.


optional credentials: boolean

Defined in: src/plugins/middleware/cors.ts:24

Whether to allow credentials.


optional exposedHeaders: string | string[]

Defined in: src/plugins/middleware/cors.ts:20

HTTP headers to expose.


optional maxAge: number

Defined in: src/plugins/middleware/cors.ts:28

Maximum age of preflight request.


optional methods: string | string[]

Defined in: src/plugins/middleware/cors.ts:12

HTTP methods to allow.


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

Defined in: src/plugins/middleware/cors.ts:8

Origin to allow. Can be a string, array of strings, or function that returns a string.