Skip to content

Commit 23dfe7e

Browse files
committed
TASK: Rename cache control header according to standards
Resolves: #14
1 parent 84046cd commit 23dfe7e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Classes/Middleware/PublicCacheHeaderMiddleware.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
3232

3333
$response = $next->handle($request);
3434

35-
if ($response->hasHeader("CacheControl")) {
35+
if ($response->hasHeader("Cache-Control")) {
3636
return $response;
3737
}
3838

@@ -52,7 +52,7 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
5252
$response->getBody()->rewind();
5353
$response = $response
5454
->withHeader('ETag', '"' . $entryContentHash . '"')
55-
->withHeader('CacheControl', 'public, max-age=' . $publicLifetime);
55+
->withHeader('Cache-Control', 'public, max-age=' . $publicLifetime);
5656
}
5757

5858
return $response;

0 commit comments

Comments
 (0)