From e7e1cf15633fefe2f1fc1443c9ec4c01bd14abc9 Mon Sep 17 00:00:00 2001 From: o Date: Wed, 19 Feb 2014 13:20:58 +0100 Subject: don't redirect https traffic terminated beforehand --- templates/vhosts/default.erb | 1 + 1 file changed, 1 insertion(+) (limited to 'templates') 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 } ]) %> -- cgit v1.2.3