mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 08:55:54 +00:00
getBaseUrl() checks for HTTP_X_FORWARDED_HOST and HTTP_X_FORWARDED_PROTO
This commit is contained in:
parent
4e08744631
commit
dc868bd83b
|
@ -803,12 +803,12 @@ function getBaseUrl() { /* {{{ */
|
|||
if(!empty($settings->_baseUrl))
|
||||
return $settings->_baseUrl;
|
||||
|
||||
if(isset($_SERVER['X-Forwarded-Host']))
|
||||
$host = $_SERVER['X-Forwarded-Host'];
|
||||
if(isset($_SERVER['HTTP_X_FORWARDED_HOST']))
|
||||
$host = $_SERVER['HTTP_X_FORWARDED_HOST'];
|
||||
else
|
||||
$host = $_SERVER['HTTP_HOST'];
|
||||
if(isset($_SERVER['X-Forwarded-Proto']))
|
||||
$ssl = $_SERVER['X-Forwarded-Proto'] == 'https';
|
||||
if(isset($_SERVER['HTTP_X_FORWARDED_PROTO']))
|
||||
$ssl = $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https';
|
||||
else
|
||||
$ssl = (isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0));
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user