News for hackers. Stuff that matters.
Re:Cache your CORS by nmjenkins on Tuesday September 20, 2022 @05:22AM (#32909488)
This is because you have forgotten to return a `Vary: Origin` header in the response. If you don’t do this, caches will presume the response is the same regardless of the Origin header in the request and so you will get the bug you describe.
Re:Cache your CORS by zemnmez on Sunday October 02, 2022 @01:51AM (#33053237)
Vary has no effect on the cors preflight cache: https://stackoverflow.com/questions/42848208/cors-preflight-...
Re:Cache your CORS by kevincox on Tuesday September 20, 2022 @02:16PM (#32915715)
Of course note that some common CDNs just ignore the `Vary` header. cough Cloudflare cough. Also IIRC not refusing to cache anything with a `Vary` header but caching it anyways and serving it no matter what headers the client sends.