diff --git a/src/Middleware/Https.php b/src/Middleware/Https.php index ae00302..70501cb 100644 --- a/src/Middleware/Https.php +++ b/src/Middleware/Https.php @@ -84,12 +84,10 @@ public function __invoke(ServerRequestInterface $request, ResponseInterface $res $request = $request->withUri($uri); } - $response = $next($request, $response); - if (!empty($this->maxAge)) { $response = $response->withHeader(self::HEADER, sprintf('max-age=%d%s', $this->maxAge, $this->includeSubdomains ? ';includeSubDomains' : '')); } - return $response; + return $next($request, $response); } }