Account for localhost/testing sites in domain checks

This commit is contained in:
Nabeel Shahzad
2021-02-13 15:59:19 -05:00
parent a6f62045c4
commit 4e652c91ae
2 changed files with 5 additions and 0 deletions

View File

@@ -123,6 +123,10 @@ class Utils
return $val;
}
if ($result->hostname === 'localhost') {
return 'localhost';
}
// Couldn't validate a domain, see if this is an IP address?
if (filter_var($url, FILTER_VALIDATE_IP)) {
return $url;