Caddy Version
v2.6.2
Environment
Running from binary via a systemd service on an Ubuntu Server based image as a nonprivileged service user.
dns cloudflare is the only additional plugin installed and is used for acme challenges the caddy binary is an official one downloaded from the Caddy download page: Download Caddy
Caddyfile:
(common) {
header /* {
-Server
+x-gateway "dz021"
}
}
www.example.com:3023 {
import common
reverse_proxy https://10.3.2.21:2001
tls {
dns cloudflare "[ Redacted ]"
}
}
The problem I’m having:
Normal requests to say https://www.example.com:3023/test
would have the Server: Caddy
removed and the x-gateway: dz021
header is present. However when requesting a url which upgrades to a websocket the response headers lack the gateway header and the Server header is still present. I’ve tried reading the documentation and shifting options around in the Caddyfile but was met with errors. How can I get the desired headers to show in the response?
Thank you for any assistance.