Cache bug on cors-requests?

bug
cache

#1

I have a springboot-backend-api behind cloudflare. It’s configured to cache everything and to respect existing headers.
If I call my endpoints directly everything is fine.
image
The response header from cloudflare says HIT, my backend-api access-log also confirms that no requests are received.

When my react-app makes a cors-request to the same endpoint something peculiar happens
image
I still get a HIT from cloudflare, but my backend also receives the request. Cloudflare however is still serving the cached object, ignoring the request it just made.

Is there a reason why cloudflare would “bleed” requests like this on cors-requests?


#2

Solved it.
My preflight response was setting the Access-Control-Max-Age to zero :facepalm:
My bad this one.