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
18 changed files with 195 additions and 8 deletions
@@ -229,6 +229,13 @@ func (in *ErrorPage) DeepCopyInto(out *ErrorPage) {
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.StatusRewrites != nil {
in, out := &in.StatusRewrites, &out.StatusRewrites
*out = make(map[string]int, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
in.Service.DeepCopyInto(&out.Service)
return
}