detect localhost by HTTP_HOST instead of SERVER_ADDR

This commit is contained in:
coderkun 2015-08-10 20:21:30 +02:00
commit aa9df0f481

View file

@ -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);
} }
} }