more minor logging lint

This commit is contained in:
Michael Quigley 2022-07-21 16:19:05 -04:00
parent 770b697c95
commit 5598f40426
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62

View File

@ -17,6 +17,7 @@ func NewProxy(target string) (*httputil.ReverseProxy, error) {
director := proxy.Director
proxy.Director = func(req *http.Request) {
director(req)
logrus.Infof("-> %v", req.URL.String())
req.Header.Set("X-Proxy", "zrok")
}
proxy.ModifyResponse = func(resp *http.Response) error {
@ -38,6 +39,5 @@ func NewProxyHandler(proxy *httputil.ReverseProxy) *proxyHandler {
}
func (self *proxyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
logrus.Infof("%v->%v", r.Host, r.URL)
self.proxy.ServeHTTP(w, r)
}