Ir al contenido
Español

CorsOptionsValidator

Esta página aún no está disponible en tu idioma.

Defined in: src/http/middleware/CorsOptions.ts:76

Validates resolved CorsOptionsType settings. maxAge (the preflight cache lifetime, in seconds) must be non-negative; the cross-field rule enforces the Fetch spec’s ban on combining credentials with a wildcard ('*') origin. (The required-ness of origins is a separate guard in cors().)

new CorsOptionsValidator(): CorsOptionsValidator

Defined in: src/http/middleware/CorsOptions.ts:77

CorsOptionsValidator

OptionsValidator<CorsOptionsType>.constructor

validate(settings): void

Defined in: src/util/OptionsValidator.ts:75

Check the (merged) settings; throws OptionsError on the first violation. Unset (undefined) fields always pass.

Partial<T>

void

OptionsValidator.validate