Skip to content

Taxum / @taxum/core / middleware/cors / AllowHeaders

Class: AllowHeaders

Defined in: middleware/cors/allow-headers.ts:11

Holds configuration for how to set the Access-Control-Allow-Headers header.

See

Methods

any()

static any(): AllowHeaders

Defined in: middleware/cors/allow-headers.ts:52

Allows any headers by sending a wildcard (*).

Returns

AllowHeaders


default()

static default(): AllowHeaders

Defined in: middleware/cors/allow-headers.ts:18

Returns

AllowHeaders


from()

static from(like): AllowHeaders

Defined in: middleware/cors/allow-headers.ts:22

Parameters

like

AllowHeadersLike

Returns

AllowHeaders


list()

static list(headers): AllowHeaders

Defined in: middleware/cors/allow-headers.ts:59

Sets multiple allowed headers.

Parameters

headers

string[]

Returns

AllowHeaders


mirrorRequest()

static mirrorRequest(): AllowHeaders

Defined in: middleware/cors/allow-headers.ts:66

Allow any headers by mirroring the preflight Access-Control-Request-Headers header.

Returns

AllowHeaders


none()

static none(): AllowHeaders

Defined in: middleware/cors/allow-headers.ts:45

Allows no headers.

Returns

AllowHeaders