summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authoro <o@immerda.ch>2014-02-19 13:20:58 +0100
committero <o@immerda.ch>2014-02-19 13:20:58 +0100
commite7e1cf15633fefe2f1fc1443c9ec4c01bd14abc9 (patch)
treed3a1c7a9d6935f831c98e3eb417dd1e56507a0b7 /templates
parent9fabf0bf2af83980c2135486432b46ae87499457 (diff)
don't redirect https traffic terminated beforehand
Diffstat (limited to 'templates')
-rw-r--r--templates/vhosts/default.erb1
1 files changed, 1 insertions, 0 deletions
diff --git a/templates/vhosts/default.erb b/templates/vhosts/default.erb
index 809cd9b..5201406 100644
--- a/templates/vhosts/default.erb
+++ b/templates/vhosts/default.erb
@@ -28,6 +28,7 @@ vhost_parts.each do |vhost_part| -%>
<% if ssl_mode == 'force' && vhost_part == :normal -%>
RewriteEngine On
RewriteCond %{HTTPS} !=on
+ RewriteCond %{HTTP:X-Forwarded-Proto} !=https
RewriteRule (.*) https://%{SERVER_NAME}$1 [R=permanent,L]
<% else -%>
<%= scope.function_templatewlv([template_partial, {'vhost_part' => vhost_part } ]) %>