Permalink
Browse files

BUGFIX: fixing core error that occurs when there are two or more prox…

…y servers in front of the SilverStripe application server
  • Loading branch information...
1 parent 4d64946 commit 523c19e88a9972f402d0803dff0df123e8d8b7c1 Julian Seidenberg committed with chillu Apr 13, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 core/Core.php
View
@@ -116,7 +116,8 @@
* 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'], ',');
}
}

0 comments on commit 523c19e

Please sign in to comment.