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;