Commit fa101e07 authored by anarcat's avatar anarcat Committed by Adrian Rossouw

also check the equivalent of hostname -f to determine localhost

parent 81c4754b
......@@ -43,7 +43,7 @@ function provision_is_local_host($host) {
// your site alias. Note that sometimes 'uname -n' does not return the
// correct value. To fix it, put the correct hostname in /etc/hostname
// and then run 'hostname -F /etc/hostname'.
return ($host == 'localhost') || ($host == '127.0.0.1') || ($host == strtolower(php_uname('n')));
return ($host == 'localhost') || ($host == '127.0.0.1') || ($host == strtolower(php_uname('n'))) || ($host == strtolower(gethostbyaddr(gethostbyname(php_uname('n')))));
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment