Expand description
Strict-Transport-Security on every response, opt-in (spec §13.4:
agents SHOULD enforce HSTS on HTTP-based bindings).
The built-in listener speaks plain HTTP, and a browser ignores this header on a response that did not arrive over TLS (RFC 6797 §8.1). It does its job when TLS terminates in front of this server, at a proxy or load balancer, which is the deployment the header is for. A proxy that sets HSTS itself makes this wrapper unnecessary.
Structs§
- Hsts
- Wraps any
Dispatcherand addsStrict-Transport-Securityto each of its responses.