Cache / page rules being ignored (cache-control etc)
I have a very simple cache rule to match our development subdomain (ex. dev.foo.com) to bypass cache/override origin not not cache anything, However, it seems this directive is totally being ignored. How can I debug this?
here are some headers:
6 Replies
These days you can use trace, account level option, pop in your URL and it'll tell you if it hit any Cache Rules.
But I would say though, that's about what I would expect from a cache rule just set to bypass, you have Cf-Cache-Status dynamic. if you're talking about the Cache-Control header, did you set an override for browser cache ttl? It's a separate option in cache rules below Cache Status.
🤔
Weird, looks like if the cache status is set to bypass it just ignores browser ttl.
There's an easier way to do this then fighting with Cache Rules though, you can make a Transform Rule Modify Response Header (Rules -> Transform Rules -> Modify Response Header -> Create Rule)
Magic Link: https://dash.cloudflare.com/?to=/:account/:zone/rules/transform-rules/modify-response-header/new
Example:
Can set Cache-Control to whatever you like.
Curious bug though, I was testing setting it to something higher and it just wasn't working, def shouldn't be happening. I'll mess around with it a bit more in the morning and see if it can't be fixed/escalated if it's reproducable
Trust me as far as bugs go you ain't seen nothing till you're tried to config an IIS server
But thank you! I'll check out transforms tomorrow