BUG Add support for X-Forwarded-Proto checking SSL (Fixes #1416)

De-facto standard for identifying the originating protocol of an HTTP request through a reverse proxy or load balancer.

http://www.geekisp.com/faq/6_65_en.html
This commit is contained in:
Will Rossiter 2014-01-12 18:05:09 +13:00
parent e7266535c5
commit c61f6540fb

View File

@ -477,10 +477,15 @@ class Director implements TemplateGlobalProvider {
}
}
if((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off')) {
if(isset($_SERVER['X-Forwarded-Proto'])) {
if(strtolower($_SERVER['X-Forwarded-Proto']) == "https") {
return true;
}
else if(isset($_SERVER['SSL'])) {
}
if((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off')) {
return true;
} else if(isset($_SERVER['SSL'])) {
return true;
}