Skip to content

Commit f240689

Browse files
Fixed merge conflict
2 parents 6c4ba3a + c40d542 commit f240689

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

includes/class-crowdhandler-gatekeeper.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,16 @@ public function checkRequest()
4949
$this->gateKeeper->setIgnoreUrls(
5050
"/^((?!.*\?).*(\.(avi|css|eot|gif|ico|jpg|jpeg|js|json|mov|mp4|mpeg|mpg|og[g|v]|pdf|png|svg|ttf|txt|wmv|woff|woff2|xml))$)|(?!.*\?.*w[c|p]-.+).*(^.*w[c|p]-.+)|^((?!.*\?.*xmlrpc\.php).*xmlrpc.php)|\?rest_route=.+/"
5151
);
52-
53-
$this->gateKeeper->checkRequest();
54-
$this->gateKeeper->redirectIfNotPromoted();
55-
$this->gateKeeper->setCookie();
56-
$this->gateKeeper->setFailTrust(true);
52+
53+
$isHostServer = $this->gateKeeper->ip === $_SERVER["SERVER_ADDR"];
54+
55+
if (!$isHostServer) {
56+
$this->gateKeeper->setFailTrust(true);
57+
$this->gateKeeper->checkRequest();
58+
$this->gateKeeper->setCookie();
59+
$this->gateKeeper->redirectIfNotPromoted();
60+
}
61+
5762

5863
$this->requestChecked = true;
5964

0 commit comments

Comments
 (0)