CorsOptionsValidator
Este conteúdo não está disponível em sua língua ainda.
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().)
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CorsOptionsValidator():
CorsOptionsValidator
Defined in: src/http/middleware/CorsOptions.ts:77
Returns
Section titled “Returns”CorsOptionsValidator
Overrides
Section titled “Overrides”OptionsValidator<CorsOptionsType>.constructor
Methods
Section titled “Methods”validate()
Section titled “validate()”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.
Parameters
Section titled “Parameters”settings
Section titled “settings”Partial<T>
Returns
Section titled “Returns”void
