fix: overwrite redirect content length (#632)

* fix: overwrite redirect content length

* copy redirect struct headers
This commit is contained in:
Elio Bischof 2024-08-06 11:58:52 +02:00 committed by GitHub
parent 8f80225a20
commit 6f0a630ad4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -246,7 +246,7 @@ func NewRedirect(url string) *Redirect {
}
func (red *Redirect) writeOut(w http.ResponseWriter, r *http.Request) {
gu.MapMerge(r.Header, w.Header())
gu.MapMerge(red.Header, w.Header())
http.Redirect(w, r, red.URL, http.StatusFound)
}