Support rewriting status codes in error page middleware

This commit is contained in:
Daniel Peinhopf 2025-03-03 11:54:04 +01:00 committed by GitHub
parent f0849e8ee6
commit fa76ed57d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 195 additions and 8 deletions

View file

@ -4160,7 +4160,10 @@ func TestLoadIngressRoutes(t *testing.T) {
Middlewares: map[string]*dynamic.Middleware{
"default-errorpage": {
Errors: &dynamic.ErrorPage{
Status: []string{"404", "500"},
Status: []string{"404", "500"},
StatusRewrites: map[string]int{
"404": 200,
},
Service: "default-errorpage-errorpage-service",
Query: "query",
},