detect localhost by HTTP_HOST instead of SERVER_ADDR
This commit is contained in:
parent
3c92b7393c
commit
aa9df0f481
1 changed files with 1 additions and 1 deletions
|
|
@ -135,7 +135,7 @@
|
||||||
*/
|
*/
|
||||||
private function isLocalhost()
|
private function isLocalhost()
|
||||||
{
|
{
|
||||||
return ($_SERVER['SERVER_ADDR'] == '127.0.0.1' || $_SERVER['SERVER_ADDR'] = '::1');
|
return (strpos($_SERVER['HTTP_HOST'], '.') === false);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue