return early if rule is * and remove one level of nesting
parent
a92ceaf4fe
commit
7e584de9e8
|
@ -54,11 +54,12 @@ class NoProxyPattern
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($this->rules as $rule) {
|
foreach ($this->rules as $rule) {
|
||||||
|
if ($rule == '*') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
$match = false;
|
$match = false;
|
||||||
|
|
||||||
if ($rule == '*') {
|
|
||||||
$match = true;
|
|
||||||
} else {
|
|
||||||
list($ruleHost) = explode(':', $rule);
|
list($ruleHost) = explode(':', $rule);
|
||||||
list($base) = explode('/', $ruleHost);
|
list($base) = explode('/', $ruleHost);
|
||||||
|
|
||||||
|
@ -89,7 +90,6 @@ class NoProxyPattern
|
||||||
$match = false;
|
$match = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ($match) {
|
if ($match) {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue