Skip to content

Commit

Permalink
Merge pull request fabiolb#477 from fabiolb/pr466-more-robust
Browse files Browse the repository at this point in the history
Issue fabiolb#466: make redirect code more robust
  • Loading branch information
magiconair committed Mar 26, 2018
2 parents 0e7043b + 12ddce8 commit c718014
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion proxy/http_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c718014

Please sign in to comment.