You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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-Encoding2, short of effectively rewriting all the cors code minus the Vary: 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?
I have opened a PR that will close this issue. I tentatively set the package version to 2.9.0, because I believe this feature warrants a new minor version but does not warrant a new major version.
Apologies for the ping if you are no longer maintaining this package!
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 Origin: Vary header after the cors middleware has been applied to your route.
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: