-
-
Notifications
You must be signed in to change notification settings - Fork 471
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 ability to omit Vary: Origin
header
#317
Comments
cc @UlisesGascon @troygoode @dougwilson I have opened a PR that will close this issue. I tentatively set the package version to Apologies for the ping if you are no longer maintaining this package! |
For anyone who encounters this: It might be tedious, depending on how many routes you need to apply this to, but here's a function you can use to remove the
|
I opened a discussion on Slack (https://openjs-foundation.slack.com/archives/C02QB1731FH/p1711971438045899), I want to collect more feedback on this. Feel free to join us in slack. invitation link |
Edit: What are you setting for Hmm when we have a fixed origin like either If I set Right now the code will set Lines 41 to 66 in 53312a5
That came in w/ #30 Im not sure that was correct though. The MDN link w/ the commit message says:
When not using an allowlist, we shouldn't need |
Updates from the Fetch Spec, we shouldn't be setting Vary: origin for static or https://fetch.spec.whatwg.org/#cors-protocol-and-http-caches
|
Hello! Thank you to the authors and maintainers for this important package.
We have an issue where we would like the ability to conditionally omit
Vary: Origin
as a header. In our use case, we have specific routes for which the responses does not vary based on the requesting origin, e.g. a route for vending static image content.Without this functionality, we are unable to use Cloudflare Polish1, which only accepts
Vary: Accept-Encoding
2, short of effectively rewriting all thecors
code minus theVary: Origin
header.Would this repository be able to add this functionality, or accept a patch to allow conditionally removing this header based on the requested routes?
Thank you again!
Footnotes
https://developers.cloudflare.com/images/polish/ ↩
https://developers.cloudflare.com/images/polish/cf-polished-statuses/ ↩
The text was updated successfully, but these errors were encountered: