diff --git a/config/routes.php b/config/routes.php index b0b906513..ffbe4e504 100644 --- a/config/routes.php +++ b/config/routes.php @@ -67,11 +67,13 @@ Router::scope('/', function (RouteBuilder $routes) { return true; } $allowedCaller = Configure::read('API.allowedCaller'); - $callerIp = $request->clientIp(); - foreach($allowedCaller as $allowed) { - $ip = gethostbyname($allowed); - if($ip === $callerIp) return true; - } + if($allowedCaller && count($allowedCaller) > 0) { + $callerIp = $request->clientIp(); + foreach($allowedCaller as $allowed) { + $ip = gethostbyname($allowed); + if($ip === $callerIp) return true; + } + } } } }); diff --git a/mithril_client b/mithril_client index a04d47699..21d4a0a5e 160000 --- a/mithril_client +++ b/mithril_client @@ -1 +1 @@ -Subproject commit a04d4769974b9d93ba72e490ed7dca3fbaed768c +Subproject commit 21d4a0a5e9a19f251e26c0ae07ce74be2fa99bbf