-
-
Notifications
You must be signed in to change notification settings - Fork 105
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
Cache-Control Header keeps showing "public, max-age=0" #508
Comments
can you write it in English? I don't speak german. |
Oh lmao forgot to translate it TwT |
Change the execution order may fix the issue, since the Lines 360 to 363 in bcf294f
|
To what @climba03003 is saying, the headers from As a work around, you can set |
Thats exactly what I want. Static Files should be Cacheable because its kinda dumb to always load the same file over and over again |
What do you mean with |
Prerequisites
Fastify version
5.2.1
Plugin version
8.1.0
Node.js version
20.18.2
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
rolling
Description
Hello,
as already described on the Discord server of Fastify, the documentation regarding the setHeader is extremely poor, at least I can't find any way to include the Cache-Control header functionally without getting back
Cache-Control: public, max-age=0
. Unfortunately there are also no tests or templates that rely on the setHeaders function despite the fact that Fastify, in my opinion, places an extremely high value on tests.Anyway, back to the problem. I have already tried the following versions:
and more.
I've seen some similar issues but they all use a Third Party Package which I don't want for something like that, that HAS TO BE easy to understand and implement
Link to code that reproduces the bug
akama-aka/cdn-cgi#36
Expected Behavior
No response
The text was updated successfully, but these errors were encountered: