-
Notifications
You must be signed in to change notification settings - Fork 218
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
"brotli_static on;" causes "Vary: Accept-Encoding" to be added to every file (including images) #97
Comments
I guess I should add as a clarification that what was happening was brotli_static was adding the "Vary: Accept-Encoding" to file types NOT listed in the |
Do gzip_static and brotli_static behave differently (taking into account brotli_types and gzip_types)? Is the Vary only too much for static (pre-compressed) data, or also for run-time (live) compressed data? I mean do and thus, is this only related to statically compressed files, or also for dynamically compressed files? |
This patch is only relevant when you are using If you aren't using If you only use Whether the statically compressed file exists or not is irrelevant. It's a logic-error in the static code that was triggering the vary header too soon before doing other checks. |
Is there any advance on this issue? I was going to put it into my server, but this scares me a lot. |
Regarding |
Sorry, bumped my enter key and github submitted this empty... argh... Anyhow, I just noticed this bug.
I have brotli_static enabled at the 'server' level. I just noticed that the "Vary: Accept-Encoding" header is added to things it shouldn't be... Biggest example is images! I noticed all my .png, .jpg, and .gif had that header. I started going nuts trying to figure out what was causing it... Finally when I disabled brotli_static things went back to normal.
Having nginx's gzip_static enabled in the same 'server' context works as expected. Not sure how similar the code is, but maybe there's some inspiration there that could help fix this issue.
This is happening for files directly served by nginx, running 1.17.9
The text was updated successfully, but these errors were encountered: