Caching Help

I am hoping someone can point me in the right direction here.

What type of settings / headers should I be setting in my origin to achieve this:

  1. When cf is not in development mode, cache static files and set the max age to specified settings in caching tab.
  2. When I enable development mode, nothing should be cached.

I have #1 working. However, in development mode Cloudflare is being “bypassed” which is good, but my origin is telling the browser to cache indefinitely.

I could only get #1 to work if I disabled caching in my node express app. That being said not setting caching headers makes browsers guess at the max age and adds it.

So is it possible to completely disable caching at my origin, but still have Cloudflare cache when not in development mode?

This topic was automatically closed after 14 days. New replies are no longer allowed.