Skip to content

Commit

Permalink
Fixes #9240, this honors the HTTP_X_FORWARDED_PROTO header for ssl co…
Browse files Browse the repository at this point in the history
…nnections correctly now
  • Loading branch information
kormoc committed Dec 21, 2010
1 parent 7cb9061 commit 79b92f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/defines.php
Expand Up @@ -97,7 +97,7 @@
$_SERVER['HTTP_HOST'] = $host;
$_SERVER['HTTP_PORT'] = $port;

if ($_SERVER['HTTP_PORT'] == '443' || $_SERVER['HTTP_PORT'] == '8443')
if ($_SERVER['HTTP_PORT'] == '443' || $_SERVER['HTTP_PORT'] == '8443' || $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
$_SERVER['HTTPS'] = 'on';

$root_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://';
Expand Down

0 comments on commit 79b92f6

Please sign in to comment.