Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ CHANGELOG
* Register alias for argument for workflow services with workflow name only
* Configure the `ErrorHandler` on `FrameworkBundle::boot()`
* Allow setting `debug.container.dump` to `false` to disable dumping the container to XML
* Add `framework.http_cache.skip_response_headers` option

6.2
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,10 @@ private function addHttpCacheSection(ArrayNodeDefinition $rootNode): void
->performNoDeepMerging()
->scalarPrototype()->end()
->end()
->arrayNode('skip_response_headers')
->performNoDeepMerging()
->scalarPrototype()->end()
->end()
->booleanNode('allow_reload')->end()
->booleanNode('allow_revalidate')->end()
->integerNode('stale_while_revalidate')->end()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,10 @@ private function registerHttpCacheConfiguration(array $config, ContainerBuilder
unset($options['private_headers']);
}

if (!$options['skip_response_headers']) {
unset($options['skip_response_headers']);
}

$container->getDefinition('http_cache')
->setPublic($config['enabled'])
->replaceArgument(3, $options);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,7 @@ class_exists(SemaphoreStore::class) && SemaphoreStore::isSupported() ? 'semaphor
'enabled' => false,
'debug' => '%kernel.debug%',
'private_headers' => [],
'skip_response_headers' => [],
],
'rate_limiter' => [
'enabled' => !class_exists(FullStack::class) && class_exists(TokenBucketLimiter::class),
Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Component/HttpClient/CachingHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public function __construct(HttpClientInterface $client, StoreInterface $store,
unset($defaultOptions['debug']);
unset($defaultOptions['default_ttl']);
unset($defaultOptions['private_headers']);
unset($defaultOptions['skip_response_headers']);
unset($defaultOptions['allow_reload']);
unset($defaultOptions['allow_revalidate']);
unset($defaultOptions['stale_while_revalidate']);
Expand Down