diff --git a/proxy/http_proxy.go b/proxy/http_proxy.go index b531373af..a4415d573 100644 --- a/proxy/http_proxy.go +++ b/proxy/http_proxy.go @@ -99,7 +99,7 @@ func (p *HTTPProxy) ServeHTTP(w http.ResponseWriter, r *http.Request) { RawQuery: r.URL.RawQuery, } - if t.RedirectCode != 0 { + if t.RedirectCode != 0 && t.RedirectURL != nil { http.Redirect(w, r, t.RedirectURL.String(), t.RedirectCode) if t.Timer != nil { t.Timer.Update(0)