1. Caddy version (caddy version
):
v2.5.1 h1:bAWwslD1jNeCzDa+jDCNwb8M3UJ2tPa8UZFFzPVmGKs=
2. How I run Caddy:
Via services
a. System environment:
Ubuntu
b. Command:
N/A
c. Service/unit/compose file:
N/A
d. My complete Caddyfile or JSON config:
(customheaders) {
header /* {
Server "My Header"
}
}
thisismysite.com {
import customheaders
root * /var/www/html
file_server
import logs
handle_errors {
@404 {
expression {http.error.status_code} == 404
}
handle @404 {
rewrite * /404.html
file_server
}
}
}
3. The problem I’m having:
308 Redirects add the Server header for “Caddy” despite the custom header directive being set in the config.
4. Error messages and/or full log output:
N/A
5. What I already tried:
I’ve tried several different combinations of overwriting the server banner to no avail. Caddy should be honoring the custom server directive for everything globally.