Skip to content

Taxum / @taxum/core / middleware/cors / MaxAge

Class: MaxAge

Defined in: middleware/cors/max-age.ts:12

Holds configuration for how to set the Access-Control-Max-Age header.

See

Methods

default()

static default(): MaxAge

Defined in: middleware/cors/max-age.ts:19

Returns

MaxAge


dynamic()

static dynamic(fn): MaxAge

Defined in: middleware/cors/max-age.ts:56

Sets a dynamic Access-Control-Max-Age header.

Parameters

fn

DynamicMaxAge

Returns

MaxAge


exact()

static exact(maxAge): MaxAge

Defined in: middleware/cors/max-age.ts:49

Sets a fixed Access-Control-Max-Age header.

Parameters

maxAge

number

Returns

MaxAge


from()

static from(like): MaxAge

Defined in: middleware/cors/max-age.ts:23

Parameters

like

MaxAgeLike

Returns

MaxAge


none()

static none(): MaxAge

Defined in: middleware/cors/max-age.ts:42

Disables the Access-Control-Max-Age header.

Returns

MaxAge