From b598c93dc35a91270df9f191326260756e9f8024 Mon Sep 17 00:00:00 2001 From: Beatrycze Volk Date: Tue, 5 Sep 2023 13:59:06 +0200 Subject: [PATCH] Change middleware type --- Classes/Middleware/PageViewProxy.php | 1 - Configuration/RequestMiddlewares.php | 4 +++- Tests/Functional/Api/PageViewProxyTest.php | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Classes/Middleware/PageViewProxy.php b/Classes/Middleware/PageViewProxy.php index e7e2b34afe..20223dc90f 100644 --- a/Classes/Middleware/PageViewProxy.php +++ b/Classes/Middleware/PageViewProxy.php @@ -78,7 +78,6 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface $response = $handler->handle($request); // Get input parameters and decrypt core name. $parameters = $request->getQueryParams(); - // Return if not this middleware if (!isset($parameters['middleware']) || ($parameters['middleware'] != 'dlf/page-view-proxy')) { return $response; } diff --git a/Configuration/RequestMiddlewares.php b/Configuration/RequestMiddlewares.php index 51de257ae7..f7ddb659eb 100644 --- a/Configuration/RequestMiddlewares.php +++ b/Configuration/RequestMiddlewares.php @@ -11,10 +11,12 @@ */ return [ - 'frontend' => [ + 'backend' => [ 'dlf/page-view-proxy' => [ 'target' => \Kitodo\Dlf\Middleware\PageViewProxy::class, ], + ], + 'frontend' => [ 'dlf/search-in-document' => [ 'target' => \Kitodo\Dlf\Middleware\SearchInDocument::class, 'after' => [ diff --git a/Tests/Functional/Api/PageViewProxyTest.php b/Tests/Functional/Api/PageViewProxyTest.php index bbd6ade6d9..32b9de848d 100644 --- a/Tests/Functional/Api/PageViewProxyTest.php +++ b/Tests/Functional/Api/PageViewProxyTest.php @@ -2,7 +2,6 @@ namespace Kitodo\Dlf\Tests\Functional\Api; -use GuzzleHttp\Client as HttpClient; use Kitodo\Dlf\Tests\Functional\FunctionalTestCase; use TYPO3\CMS\Core\Utility\GeneralUtility;