跳转到内容
简体中文

HstsOptionsValidator

此内容尚不支持你的语言。

Defined in: src/http/middleware/HstsOptions.ts:53

Validates resolved HstsOptionsType settings. maxAge must be a non-negative number of seconds; the cross-field rule mirrors the hstspreload.org submission requirements — a preload policy that could never actually be accepted (too-short maxAge, or includeSubDomains turned off) is rejected rather than emitting a silently-useless header.

new HstsOptionsValidator(): HstsOptionsValidator

Defined in: src/http/middleware/HstsOptions.ts:54

HstsOptionsValidator

OptionsValidator<HstsOptionsType>.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