Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

nginx: Add preload to HSTS.

Alex Vandiver22ad7cd4ee9e
diff --git a/puppet/kandra/templates/nagios_apache_site.conf.template.erb b/puppet/kandra/templates/nagios_apache_site.conf.template.erb
index 731b6bc8ebb..9636aa272de 100644
--- a/puppet/kandra/templates/nagios_apache_site.conf.template.erb
+++ b/puppet/kandra/templates/nagios_apache_site.conf.template.erb
@@ -1,7 +1,7 @@
<VirtualHost 127.0.0.1>
ServerName nagios.teleport.<%= @default_host_domain %>
- Header add Strict-Transport-Security "max-age=31536000; includeSubdomains"
+ Header add Strict-Transport-Security "max-age=31536000; includeSubdomains; preload"
Header add X-Frame-Options DENY
ScriptAlias /cgi-bin/nagios4 /usr/lib/cgi-bin/nagios4
diff --git a/puppet/zulip/files/nginx/zulip-include-common/headers b/puppet/zulip/files/nginx/zulip-include-common/headers
index 74614dd03c8..90dbe486038 100644
--- a/puppet/zulip/files/nginx/zulip-include-common/headers
+++ b/puppet/zulip/files/nginx/zulip-include-common/headers
@@ -1,5 +1,5 @@
# Enable HSTS: tell browsers to always use HTTPS
-add_header Strict-Transport-Security "max-age=31536000; includeSubdomains" always;
+add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; preload" always;
# Set X-Frame-Options to deny to prevent clickjacking
add_header X-Frame-Options DENY always;
diff --git a/puppet/zulip/templates/supervisor/go-camo.conf.erb b/puppet/zulip/templates/supervisor/go-camo.conf.erb
index 2d23ac9995d..db86e45d4af 100644
--- a/puppet/zulip/templates/supervisor/go-camo.conf.erb
+++ b/puppet/zulip/templates/supervisor/go-camo.conf.erb
@@ -1,5 +1,5 @@
[program:go-camo]
-command=/usr/local/bin/secret-env-wrapper GOCAMO_HMAC=camo_key <%= @bin %> --listen=<%= @listen_address %>:9292 -H "Strict-Transport-Security: max-age=31536000; includeSubdomains" -H "X-Frame-Options: DENY" --metrics --verbose --allow-content-video --user-agent "Zulip-Server/<%= @zulip_version %> (<%= @external_uri %>/) go-camo/<%= @version %>" --server-name "go-camo/<%= @version %>"
+command=/usr/local/bin/secret-env-wrapper GOCAMO_HMAC=camo_key <%= @bin %> --listen=<%= @listen_address %>:9292 -H "Strict-Transport-Security: max-age=31536000; includeSubdomains; preload" -H "X-Frame-Options: DENY" --metrics --verbose --allow-content-video --user-agent "Zulip-Server/<%= @zulip_version %> (<%= @external_uri %>/) go-camo/<%= @version %>" --server-name "go-camo/<%= @version %>"
environment=HTTP_PROXY="<%= @proxy %>",HTTPS_PROXY="<%= @proxy %>"
priority=15
autostart=true
diff --git a/tools/ci/success-http-headers.template.txt b/tools/ci/success-http-headers.template.txt
index 2eab75cce26..de1edaaa220 100644
--- a/tools/ci/success-http-headers.template.txt
+++ b/tools/ci/success-http-headers.template.txt
@@ -4,7 +4,7 @@ content-type: application/json
vary: Accept-Encoding
vary: Accept-Language, Cookie
content-language: en
-strict-transport-security: max-age=31536000; includeSubdomains
+strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: DENY
x-content-type-options: nosniff
referrer-policy: strict-origin-when-cross-origin