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
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.1.1@43540 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
126d6ebbf4
commit
3bd0d6d563
@ -386,16 +386,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;
|
||||
}
|
||||
|
||||
@ -408,7 +410,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