mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Use the hostname, not the ip address, in dev/test mode tests (merged from 2.1.1 branch, r43542)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@44194 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
13a66fec1f
commit
a462cd2c20
@ -442,16 +442,18 @@ class Director {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(isset($_SESSION['isDev']) && $_SESSION['isDev']) return true;
|
||||
|
||||
// Check if we are running on one of the development servers
|
||||
if(in_array($_SERVER['SERVER_ADDR'], Director::$dev_servers)) {
|
||||
if(in_array($_SERVER['HTTP_HOST'], Director::$dev_servers)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Check if we are running on one of the test servers
|
||||
if(in_array($_SERVER['SERVER_ADDR'], Director::$test_servers)) {
|
||||
if(in_array($_SERVER['HTTP_HOST'], Director::$test_servers)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -464,7 +466,7 @@ class Director {
|
||||
}
|
||||
|
||||
// Check if we are running on one of the test servers
|
||||
if(in_array($_SERVER['SERVER_ADDR'], Director::$test_servers)) {
|
||||
if(in_array($_SERVER['HTTP_HOST'], Director::$test_servers)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user