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 includeSubdomains to HSTS.

Alex Vandiverc18a7eabbe55
diff --git a/puppet/kandra/templates/nagios_apache_site.conf.template.erb b/puppet/kandra/templates/nagios_apache_site.conf.template.erb
index bb75cdd9063..731b6bc8ebb 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"
+ Header add Strict-Transport-Security "max-age=31536000; includeSubdomains"
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 0465cd5a3cb..74614dd03c8 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 always;
+add_header Strict-Transport-Security "max-age=31536000; includeSubdomains" 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 3674528a665..2d23ac9995d 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" -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" -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 01ba79f069e..2eab75cce26 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
+strict-transport-security: max-age=31536000; includeSubdomains
x-frame-options: DENY
x-content-type-options: nosniff
referrer-policy: strict-origin-when-cross-origin