-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: solve issue with Cache-Control header deletion #6991
fix: solve issue with Cache-Control header deletion #6991
Conversation
🦋 Changeset detectedLatest commit: d30d2f3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
After a more in-depth analysis, I found that we currently have three methods that are hard deleting user-defined
In my opinion, at least As for the Looking forward to your feedback @wmertens @thejackshelton @maiieul @mhevery |
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.
Nice, thanks @nelsonprsousa
Can you add a changeset please?(follow this tutorial)
Sure, I can. What do you think about the other handlers that are actually doing the same thing? Particularly
|
I think is not correct to change that header internally because the end user needs to have the ability to manage it. |
4ede2d0
to
918ddd1
Compare
918ddd1
to
ffee7e3
Compare
@gioboa I removed the hard code removal of the Cache-Control header from qwik-city as agreed 👍 Also added a changeset. LMK if everything's ok 👍 |
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.
It looks great to me. Can you add the fallback please?
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.
Great @nelsonprsousa 👍
What is it?
Description
Currently, it is impossible to define a Cache-Control header using the
request.cacheControl
on any method that takes a request event other than success (HTTP 200). Looks like qwik-city, internally, deletes whatever is defined.I am not entirely sure about the
error()
andfail()
handlers, which are also forcing the removal of the header. I'd say that engineers could potentially decide to cache 404s, for example, and the framework should not enforce this kind of rules. However, I am not sure about this premise for 4xx or 5xx.Redirects (HTTP 301, HTTP 302, HTTP 307, HTTP 308, at least) should be totally configurable by software engineers.
Checklist
pnpm change