httpcaddyfile: Prevent error handler from overriding sub-handler matchers (#6999)

Fixes: #6957
This commit is contained in:
Youness Farini 2025-06-06 18:46:39 +01:00 committed by GitHub
parent 7099892958
commit 092913a7a5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 440 additions and 35 deletions

View file

@ -106,20 +106,29 @@ example.com {
"handler": "subroute",
"routes": [
{
"group": "group0",
"handle": [
{
"handler": "rewrite",
"uri": "/{http.error.status_code}.html"
}
]
},
{
"handle": [
{
"handler": "file_server",
"hide": [
"./Caddyfile"
"handler": "subroute",
"routes": [
{
"group": "group0",
"handle": [
{
"handler": "rewrite",
"uri": "/{http.error.status_code}.html"
}
]
},
{
"handle": [
{
"handler": "file_server",
"hide": [
"./Caddyfile"
]
}
]
}
]
}
]