sslEnforce
constsslEnforce: (config?) =>Policy
Defined in: src/policies/traffic/ssl-enforce.ts:30
Enforce HTTPS and append HSTS headers on secure responses.
Detects protocol from x-forwarded-proto (or request URL protocol).
For non-HTTPS requests, either redirects to HTTPS (301) or throws 403.
Parameters
Section titled “Parameters”config?
Section titled “config?”Redirect behavior and HSTS settings.
Returns
Section titled “Returns”A Policy at priority 5 (EARLY).