콘텐츠로 이동
한국어

CorsOptionsValidator

이 콘텐츠는 아직 번역되지 않았습니다.

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