Skip to content
Snippets Groups Projects
Commit aa0342f0 authored by jurgenhaas's avatar jurgenhaas
Browse files

Add HSTS to Drupal sites if they are not behind a proxy

parent de513566
No related branches found
No related tags found
No related merge requests found
......@@ -39,6 +39,8 @@
ServerAlias {{ drupal_domain.domain }}{% for alias in drupal_domain.aliases|default([]) %} {{ alias }}{% endfor %}
{% endif %}
Header always add Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
{% if drupal.jail is defined %}
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:{{ drupal.jail.port }}{{ drupalRoot }}/$1
{% endif %}
......@@ -146,6 +148,8 @@
ServerName dummy.{{ drupal_domain.domain }}
ServerAlias {% for redirect in drupal_domain.redirects|default([]) %} {{ redirect }}{% endfor %}{% if drupal_domain.aliases_redirect|default(False) %}{% for alias in drupal_domain.aliases|default([]) %} {{ alias }}{% endfor %}{% endif %}
Header always add Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
RewriteEngine on
RewriteRule ^ https://{{ drupal_domain.domain }}%{REQUEST_URI} [END,QSA,R=permanent]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment