From 2f6e84562d899666ba5eb4bbaa95223213cc60f3 Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 9 Jun 2019 17:43:32 +0300 Subject: [PATCH] Update request callback --- src/RequestCallback.php | 1 + src/Server.php | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RequestCallback.php b/src/RequestCallback.php index fc73df6..3a3e985 100644 --- a/src/RequestCallback.php +++ b/src/RequestCallback.php @@ -116,6 +116,7 @@ class RequestCallback if (!in_array($request->getClient()->getRemoteAddress(), $this->ipWhiteList, true)) { throw new \Exception('Requests from your IP is forbidden'); } + $this->page['response'] = $this->callApi(); } catch (\Throwable $e) { $this->setError($e); } diff --git a/src/Server.php b/src/Server.php index ac5a7bb..2294aeb 100644 --- a/src/Server.php +++ b/src/Server.php @@ -39,7 +39,6 @@ class Server $requestCallback = new RequestCallback($client, $request, $body); try { - $requestCallback->page['response'] = $requestCallback->callApi(); if ($requestCallback->page['response'] instanceof Promise) { $requestCallback->page['response'] = yield $requestCallback->page['response']; }