elixir-plug / plug

Compose web applications with functions
https://hex.pm/packages/plug
Other
2.85k stars 586 forks source link

Update `SSL` plug [`hsts_header/1`] #1208

Closed jbcaprell closed 7 months ago

jbcaprell commented 7 months ago

The preload directive is not actually part of the specification, but it is in wide use and there’s already a mechanism for adding the directive to the Strict-Transport-Security response header. The directive requires that the includeSubDomains directive be set, and although the ‘main’ HSTS Preload list parses the header right regardless (as it should!), these directives should probably be appended in that order as a just-in-case.