Skip to content

Commit

Permalink
Log final response status after authenticating (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
samuong authored Aug 1, 2024
1 parent c4e31c8 commit b123575
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ func connectViaProxy(req *http.Request, proxy *url.URL, auth *authenticator) (ne
if err != nil {
return nil, err
}
log.Printf("[%d] Got %q response", id, resp.Status)
}
resp.Body.Close()
if resp.StatusCode != http.StatusOK {
Expand Down Expand Up @@ -218,6 +219,7 @@ func (ph ProxyHandler) proxyRequest(w http.ResponseWriter, req *http.Request, au
return
}
}
log.Printf("[%d] Got %q response", id, resp.Status)
}
defer resp.Body.Close()
copyResponseHeaders(w, resp)
Expand Down

0 comments on commit b123575

Please sign in to comment.