Origin Rules affect caching

We’ve recently implemented a change where we’ve added an Origin Rule to route traffic for a particular folder to be sent to a webserver on a different port.

This works fine except that static files, such as PNGs, that were previously being cached at Cloudflare are now always returning a “DYNAMIC” value for the “cf-cache-status” header.

Our main webserver is Apache2 but the one we’re redirecting this traffic to is NGINX running on port 8443.

Not sure if the problem is something in NGINX, although we haven’t changed anything from default just running on a different port, or within our Cloudflare config, but other than the Origin Rule we’re not changed anything else.

Does anyone have any ideas what I can check?

Thanks.

It sounds like it might be this:

1 Like

Thanks @sdayman, this is very helpful.

I guess my only option will be to route the traffic on the server then and not at Cloudflare.

1 Like

If you use Tunnel, you can configure cloudflared (or via the dashboard) to connect to that port on the server.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.