From ad5af8623f3db9ea1e0d5b552b4cfc8276431f38 Mon Sep 17 00:00:00 2001 From: mh Date: Mon, 14 Apr 2014 23:12:54 +0200 Subject: only forward on https --- templates/vhosts/php_gallery2/partial.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'templates') diff --git a/templates/vhosts/php_gallery2/partial.erb b/templates/vhosts/php_gallery2/partial.erb index 26d33ee..e17f0ec 100644 --- a/templates/vhosts/php_gallery2/partial.erb +++ b/templates/vhosts/php_gallery2/partial.erb @@ -5,12 +5,12 @@ <%= scope.function_template(['apache/vhosts/partials/authentication.erb']) %> -<% if vhost_part != :ssl -%> # Always rewrite login's # Source: http://gallery.menalto.com/node/30558 RewriteEngine On + RewriteCond %{HTTPS} !=on + RewriteCond %{HTTP:X-Forwarded-Proto} !=https RewriteCond %{HTTP_COOKIE} ^GALLERYSID= [OR] RewriteCond %{QUERY_STRING} subView=core\.UserLogin RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,R,L] -<% end -%> -- cgit v1.2.3