-
Notifications
You must be signed in to change notification settings - Fork 26
Add Strict-Transport-Security header to Nginx config #691
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -198,6 +198,7 @@ server { | |
| ssl_certificate /etc/letsencrypt/live/cloud.YOUR.DOMAIN/fullchain.pem; | ||
| ssl_certificate_key /etc/letsencrypt/live/cloud.YOUR.DOMAIN/privkey.pem; | ||
| add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always; | ||
| # Increase max upload size (required for Tus — without this, uploads over 1 MB fail) | ||
| client_max_body_size 10M; | ||
|
|
@@ -231,6 +232,7 @@ server { | |
| ssl_certificate /etc/letsencrypt/live/cloud.YOUR.DOMAIN/fullchain.pem; | ||
| ssl_certificate_key /etc/letsencrypt/live/cloud.YOUR.DOMAIN/privkey.pem; | ||
| add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always; | ||
|
||
| # Increase max upload size to collabora editor | ||
| client_max_body_size 10M; | ||
|
|
@@ -255,6 +257,7 @@ server { | |
| ssl_certificate /etc/letsencrypt/live/cloud.YOUR.DOMAIN/fullchain.pem; | ||
| ssl_certificate_key /etc/letsencrypt/live/cloud.YOUR.DOMAIN/privkey.pem; | ||
| add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always; | ||
|
||
| location / { | ||
| proxy_pass http://127.0.0.1:9300; | ||
|
|
||
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 sample enables HSTS with
includeSubDomains; preloadby default.preloadis effectively permanent once a domain is submitted/accepted in the browser preload list, andincludeSubDomainscan break any subdomain that isn’t served over HTTPS. Consider removingpreload(and possiblyincludeSubDomains) from the default snippet, or add an explicit warning/note with a link to hstspreload.org and guidance on when to enable it.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.
@micbar as I understand it -> having
includeSubDomainspreloadis too aggressive for default config.Maybe we should remove
includeSubDomainspreloadhere opencloud-eu/opencloud-compose#228 too?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.
@dragonchaser FYI