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

fix cache-control response header honoring for browser cache endpoint and immutable honoring for Pro CDN #17

Merged
merged 2 commits into from
Nov 6, 2023

Conversation

necipallef
Copy link
Contributor

@necipallef necipallef commented Oct 30, 2023

Bug: There is a problem with the browser cache endpoint's response. The Cache-Control header is not propagated as-is to the browser. It should be Cache-Control: max-age=31534000, immutable, private but it is Cache-Control: max-age=0, no-cache, no-store, and also the response has Pragma: no-cache which shouldn't have.

The solution has two steps:

  • Use "caching" behavior on the browser cache endpoint rule, just like Pro CDN. This fixes the problem with Pragma header. This also fixes the problem with max-age and private, but immutable flag is still missing.
  • Use "downstreamCache" behavior in the browser cache endpoint rule. This fixes the problem with immutable flag. Add this behavior also to the ProCDN rule since it may be needed in the future.

@necipallef necipallef marked this pull request as draft October 30, 2023 09:02
@github-actions
Copy link

This PR will create a patch release 🚀

1.0.2 (2023-10-30)

Bug Fixes

  • browserCacheEndpointCache: fix cache-control response header honoring (971a2cd)
  • browserCacheEndpointCache: fix cache-control response header immmutable flag (0feacfd)

@necipallef necipallef marked this pull request as ready for review October 30, 2023 12:34
@necipallef necipallef requested a review from ilfa October 30, 2023 12:43
@necipallef necipallef merged commit a12d93e into main Nov 6, 2023
2 checks passed
@necipallef necipallef deleted the fix/browser_cache_endpoint_caching-INTER-350 branch November 6, 2023 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants