REDIR
This commit is contained in:
@@ -40,6 +40,9 @@ func (c Config) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if endpoint.Redir {
|
if endpoint.Redir {
|
||||||
|
u, _ := url.Parse(endpoint.To)
|
||||||
|
r.URL = u
|
||||||
|
r.Host = u.Host
|
||||||
http.Redirect(w, r, r.URL.String(), http.StatusSeeOther)
|
http.Redirect(w, r, r.URL.String(), http.StatusSeeOther)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user