mirror of
https://github.com/openziti/zrok.git
synced 2024-11-21 23:53:19 +01:00
more minor logging lint
This commit is contained in:
parent
770b697c95
commit
5598f40426
@ -17,6 +17,7 @@ func NewProxy(target string) (*httputil.ReverseProxy, error) {
|
|||||||
director := proxy.Director
|
director := proxy.Director
|
||||||
proxy.Director = func(req *http.Request) {
|
proxy.Director = func(req *http.Request) {
|
||||||
director(req)
|
director(req)
|
||||||
|
logrus.Infof("-> %v", req.URL.String())
|
||||||
req.Header.Set("X-Proxy", "zrok")
|
req.Header.Set("X-Proxy", "zrok")
|
||||||
}
|
}
|
||||||
proxy.ModifyResponse = func(resp *http.Response) error {
|
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) {
|
func (self *proxyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
logrus.Infof("%v->%v", r.Host, r.URL)
|
|
||||||
self.proxy.ServeHTTP(w, r)
|
self.proxy.ServeHTTP(w, r)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user