1
0
Fork 0

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

@ -313,6 +313,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
}
}
return
}