mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 12:42:34 +02:00
middleware: use status 308 instead of 301 for redirectHTTP
This commit is contained in:
parent
939c99b0cf
commit
821e4a225a
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ func (m *redirectHTTP) before(w http.ResponseWriter, r *http.Request) (proceed b
|
||||||
r.URL.Host = host
|
r.URL.Host = host
|
||||||
}
|
}
|
||||||
|
|
||||||
http.Redirect(w, r, r.URL.String(), http.StatusMovedPermanently)
|
http.Redirect(w, r, r.URL.String(), http.StatusPermanentRedirect)
|
||||||
|
|
||||||
logging.Debug().Str("url", r.URL.String()).Str("user_agent", r.UserAgent()).Msg("redirect to https")
|
logging.Debug().Str("url", r.URL.String()).Str("user_agent", r.UserAgent()).Msg("redirect to https")
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Add table
Reference in a new issue