-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add HTTP Strict-Transport-Security header to unknown URLs #62
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea SGTM, but I have a couple of practical concerns about merging this as-is:
- do we plan to remove the HSTS stuff from apps? (I think we'll need to, otherwise we're duplicating the config for this important header, which just seems unnecessarily risky.)
- why the super short max-age?
modules/www/www.vcl.tftpl
Outdated
@@ -452,6 +452,11 @@ sub vcl_miss { | |||
} | |||
|
|||
sub vcl_deliver { | |||
# Add the HSTS header with a max-age of 5 mins to URLs that don't exist | |||
if (!(resp.http.Strict-Transport-Security)) { | |||
set resp.http.Strict-Transport-Security = "max-age=300"; includeSubDomains; preload |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HSTS with max-age=300 doesn't seem useful to me — what's the rationale here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see from the notes on the internal-only Trello card that you plan to set this to 300 and then increase it later, but that doesn't make any sense to me given that we're already serving HSTS headers with an appropriately-long max-age (strict-transport-security: max-age=31536000; preload
).
didn't mean to approve there, sorry — comments kinda need addressing before merge
0584a72
to
8f2acaf
Compare
tl;dr:
|
8f2acaf
to
f530131
Compare
- This sets the HSTS header to the domain within VCL - Enables consistency throughout the CDN.
f530131
to
d843f88
Compare
Trello: https://trello.com/c/0TgCOgbX/3397-3-configure-fastly-to-always-append-an-hsts-header