make use of http_host vs. server_name configurable in script_path()
This commit is contained in:
parent
e0424fe6cc
commit
7f3df847a2
@ -505,8 +505,16 @@ function script_path() {
|
|||||||
else
|
else
|
||||||
$scheme = 'http';
|
$scheme = 'http';
|
||||||
|
|
||||||
if(x($_SERVER,'HTTP_HOST')) {
|
// Some proxy setups may require using http_host
|
||||||
$hostname = $_SERVER['HTTP_HOST'];
|
|
||||||
|
if(intval(get_app()->config['system']['script_path_use_http_host']))
|
||||||
|
$server_var = 'HTTP_HOST';
|
||||||
|
else
|
||||||
|
$server_var = 'SERVER_NAME';
|
||||||
|
|
||||||
|
|
||||||
|
if(x($_SERVER,$server_var)) {
|
||||||
|
$hostname = $_SERVER[$server_var];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return z_root();
|
return z_root();
|
||||||
|
Reference in New Issue
Block a user