CORS Access-Control-Max-Age is ignored

Roland Schütz picture Roland Schütz · May 8, 2014 · Viewed 20.1k times · Source

I'm hosting an WebApp and his API on different domains and use CORS to be able to work around the same origin policy. So far, so good. This works.

To only send a CORS preflight once per session I set the Access-Control-Max-Age to 20 days, But this is not working (tested in Chrome): https://db.tt/vfIW3fD2

What do I have to change?

Answer

Nej Kutcharian picture Nej Kutcharian · Oct 27, 2016

If you are using Chrome Dev Tools, make sure you have "Disable cache (while DevTools is open)" unchecked. I was having issues with the "Access-Control-Max-Age" not being honored only to realize that I had that option checked.