Added localhost as trusted domain
This commit is contained in:
parent
421cff00bd
commit
f8fe2753b1
1 changed files with 5 additions and 0 deletions
|
@ -13,6 +13,8 @@ class OC_Request {
|
||||||
const USER_AGENT_ANDROID_MOBILE_CHROME = '#Android.*Chrome/[.0-9]*#';
|
const USER_AGENT_ANDROID_MOBILE_CHROME = '#Android.*Chrome/[.0-9]*#';
|
||||||
const USER_AGENT_FREEBOX = '#^Mozilla/5\.0$#';
|
const USER_AGENT_FREEBOX = '#^Mozilla/5\.0$#';
|
||||||
|
|
||||||
|
const REGEX_LOCALHOST = '/^(127\.0\.0\.1|localhost)(:[0-9]+|)$/';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Check overwrite condition
|
* @brief Check overwrite condition
|
||||||
* @param string $type
|
* @param string $type
|
||||||
|
@ -38,6 +40,9 @@ class OC_Request {
|
||||||
if (empty($trustedList)) {
|
if (empty($trustedList)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (preg_match(self::REGEX_LOCALHOST, $domain) === 1) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return in_array($domain, $trustedList);
|
return in_array($domain, $trustedList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue