Cloudflare Tunnel randomly returning a 410 Gone openresty error

I use Cloudflare tunnel on my site and every once in a while, I noticed my code would break because my server was returning a 410 Gone status code. I finally caught the issue today and I quickly curled my site to see the response.
image

In the browser, it even includes a HTML page to redirect me back home. My backend is fully JSON so I know this isn’t my API.

It shows a 410 Gone status code from openresty. I don’t use openresty anywhere in my backend and I’m confused where this is coming from. I checked the logs on the tunnel agent running on my server and it doesn’t even look like it receives the traffic. Why am I getting this 410 Gone error randomly and how do I fix it?

Are you self-hosted on your own VPS, or is this with a hosting provider?

Namecheap VPS (https://www.namecheap.com/hosting/vps/). I own the server and I can SSH and everything. I’m using Cloudflare tunnel so I don’t have to port forward my host to a Docker container running inside my server.

Every time someone tracks down the source of an openresty message, it’s from the origin. Quite often through Immunify, though it can be due to something else installed on the server. They usually weren’t even aware it was there before that point. Namecheap might even have something in front of your VPS for protection.

1 Like

It’s worth noting for future reference that the presence of cf-cache-status: DYNAMIC indicates the response is coming from the origin server, and not from Cloudflare.

2 Likes