Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[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

Merged

Conversation

Toflar
Copy link
Contributor

@Toflar Toflar commented Feb 9, 2023

Q A
Branch? 6.3
Bug fix? no
New feature? yes
Deprecations? no
Tickets #49257
License MIT
Doc PR

Copy link
Member

@nicolas-grekas nicolas-grekas left a 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.

@@ -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).
Copy link
Member

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

Copy link
Member

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

Copy link
Contributor Author

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 🙈

@carsonbot carsonbot changed the title Add skip_response_headers to the HttpCache options [HttpKernel] Add skip_response_headers to the HttpCache options Feb 21, 2023
@nicolas-grekas nicolas-grekas force-pushed the feature/http-cache-skip-response-headers branch from 1344356 to 00dfb25 Compare February 21, 2023 12:50
@nicolas-grekas
Copy link
Member

Thank you @Toflar.

@nicolas-grekas nicolas-grekas merged commit 72cb6a6 into symfony:6.3 Feb 21, 2023
@Toflar Toflar deleted the feature/http-cache-skip-response-headers branch February 21, 2023 22:08
nicolas-grekas added a commit that referenced this pull request Feb 22, 2023
…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
@fabpot fabpot mentioned this pull request May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants