Skip to content
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

Add a Cache-Control header to the back end response #2473

Merged
merged 2 commits into from
Oct 30, 2020

Conversation

leofeyer
Copy link
Member

Q A
Fixed issues Fixes #1928
Docs PR or issue -

@leofeyer leofeyer added the bug label Oct 30, 2020
@leofeyer leofeyer added this to the 4.9 milestone Oct 30, 2020
@leofeyer leofeyer requested review from ausi, Toflar and a team October 30, 2020 10:10
@leofeyer leofeyer self-assigned this Oct 30, 2020
@leofeyer leofeyer linked an issue Oct 30, 2020 that may be closed by this pull request
bytehead
bytehead previously approved these changes Oct 30, 2020
@leofeyer leofeyer merged commit 649c401 into contao:4.9 Oct 30, 2020
@leofeyer leofeyer deleted the fix/cache-headers branch October 30, 2020 10:50
$response = parent::getResponse();
$response->headers->set('Cache-Control', 'no-cache, no-store');

return $response->setPrivate();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you add setPrivate? The response should not be privately cacheable by the browser?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No cache headers in back end responses
4 participants