Skip to content

Commit f95b423

Browse files
authored
Merge pull request #241 from chermant/fix/cache_control_header
Fix duplicate Cache-Control must-revalidate header in WordPressHeader…
2 parents 9901c2c + 46c080a commit f95b423

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/Route/Infrastructure/Middleware/WordPressHeaders.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ public function handle(Request $request, Closure $next): SymfonyResponse
5353
}
5454

5555
if ($this->shouldSetPublicCache()) {
56+
header_remove('Cache-Control');
57+
$response->headers->remove('Cache-Control');
5658
$response->setPublic();
5759
$response->headers->addCacheControlDirective('must-revalidate', true);
5860
$response->headers->addCacheControlDirective('max-age', '3600');

0 commit comments

Comments
 (0)