mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: fixing core error that occurs when there are two or more proxy servers in front of the SilverStripe application server
This commit is contained in:
parent
4d64946a48
commit
523c19e88a
@ -116,7 +116,8 @@ if(!isset($_SERVER['HTTP_HOST'])) {
|
||||
* Fix HTTP_HOST from reverse proxies
|
||||
*/
|
||||
if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {
|
||||
$_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_FORWARDED_HOST'];
|
||||
// Get the first host, in case there's multiple separated through commas
|
||||
$_SERVER['HTTP_HOST'] = strtok($_SERVER['HTTP_X_FORWARDED_HOST'], ',');
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user