-
Notifications
You must be signed in to change notification settings - Fork 56
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
Always set Vary: Origin
#49
Comments
Adding a note here that we're bumping into this with sites that use this library and have different requests from different origins being stored in Varnish cache. In line with what @wimleers is observing, when the request comes from the same origin, the response doesn't include a Vary header that then causes CORS blockages for future requests that receive the cached response. By always adding |
Sounds fair. @wimleers Could you work on a pull request? Since this library has been stable for a long time, perhaps we should put the "always reply with |
Created a pull request that added an additional option 'alwaysSetVaryOrigin'. If not set (default), current behavior remains unchaged. When the flag is set, this library will add a Vary: Origin header to all responses. |
Can you all try out #68 and see if it resolves your problem? I think it should fix the cacheability without adding new configuration. |
I think this should all be fixed now. |
Quoting fruitcake/laravel-cors#20:
… but actually #11 did not change this. It is still not adding the
Vary: Origin
header always.Over at fruitcake/laravel-cors#20 (comment), the maintainer of this repo (@asm89) agreed that that would be sensible to do.
@asm89, would you be still open to doing that?
The text was updated successfully, but these errors were encountered: