-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpKernel] Add skip_response_headers
to the HttpCache
options
#49318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HttpKernel] Add skip_response_headers
to the HttpCache
options
#49318
Conversation
Toflar
commented
Feb 9, 2023
Q | A |
---|---|
Branch? | 6.3 |
Bug fix? | no |
New feature? | yes |
Deprecations? | no |
Tickets | #49257 |
License | MIT |
Doc PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks, I just had some minor comments.
src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php
Outdated
Show resolved
Hide resolved
@@ -60,6 +60,9 @@ class HttpCache implements HttpKernelInterface, TerminableInterface | |||
* on responses that don't explicitly state whether the response is | |||
* public or private via a Cache-Control directive. (default: Authorization and Cookie) | |||
* | |||
* * skip_response_headers Set of response headers that are never cached even if a response is cacheable (public). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think skipped_response_headers
might be a better name for the option
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's keep it as is, it also makes sense, is shorter and prevents reindenting all the docblock :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docblock was the reason for me to keep it as short as it is now 🙈
skip_response_headers
to the HttpCache
optionsskip_response_headers
to the HttpCache
options
1344356
to
00dfb25
Compare
Thank you @Toflar. |
…headers` option (alexandre-daubois) This PR was merged into the 6.3 branch. Discussion ---------- [FrameworkBundle] Add `framework.http_cache.skip_response_headers` option | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | Followup of #49318 | License | MIT | Doc PR | symfony/symfony-docs#17951 While thinking about where to add documentation for symfony/symfony-docs#17941, I realized that all HTTP Cache options are available under `framework.http_cache` config. By adding this option as well, we'll be able to write documentation about it, in the framework configuration reference. Commits ------- 010aa39 [FrameworkBundle] Add `framework.http_cache.skip_response_headers` option