Support rewriting status codes in error page middleware
This commit is contained in:
parent
f0849e8ee6
commit
fa76ed57d3
18 changed files with 195 additions and 8 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue