Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This ensures we add the Strict-Transport-Security header and `Connection: close` to all HTTPS requests Previously, these weren't set on the static file HTTP responses but both are needed. The `Connection: close` is needed to prevent clients from reusing TLS connections, requiring our server to keep the memory-heavy version of `tls.Conn` we've forked. Connection reuse also increases the chance a client tries to perform TLS renegotiation or resumption and break our vuln detection. I suspect this latter reason isn't a genuine problem (or is and this only makes it less likely), but it's been a while since I thought hard about the patch I made to `crypto/tls`. Strict-Transport-Security should just always be set on HTTPS requests. Fixes #525 Fixes #526
- Loading branch information