The server: cloudflare header is most likely being added by Cloudflare at its edge when the request passes through its proxy, rather than by Caddy itself. If your domain’s DNS record has the Cloudflare proxy enabled, visitors receive the response from Cloudflare, which can add or modify certain response headers. To confirm, compare the response headers when accessing the site through Cloudflare with a direct request to your origin server, bypassing the proxy. Also check whether your Caddy configuration or any upstream application is setting its own Server header. Since the Caddyfile and response details haven’t been included yet, it’s difficult to identify the exact source with certainty.
You didn’t provide any information that anybody can use to help. No config. No logs. No domain name. How is anyone expected or supposed to give feedback here?
Ah - it must be the site I used to get the headers: ldns.com. It may be reading some CF cached data and adding CF’s headers also. I’m not sure what output it is giving, but I know it is not complete.
If you don’t use Cloudflare at all, then the header is probably coming from somewhere between the visitor and Caddy rather than from Caddy itself. One thing worth checking: your Windows 10 machine is running Caddy directly, so is anything else in front of it, like a hosting provider, tunnel service, or router that rewrites headers? A quick test is to request the origin directly, bypassing any proxy, and compare the raw headers with what a normal client sees. If the header only appears externally, something upstream is adding it; if it shows up even locally, then look at Caddy plugins or app code setting a Server header.
That’s a good point. I’d also compare the response headers from a direct request to the origin with those from the public domain. This helps narrow down whether the Server header is being added by Caddy, the application, or an upstream proxy. If the header appears only on external requests, I’d investigate the router, tunnel, or hosting layer first.
Just now had a chance to test it myself. That website is broken. They don’t distinguish between their own headers and the headers coming from endpoint under test. Don’t use it.