Fix logging
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
6dca5c5286
commit
4ab3108f30
8
main.go
8
main.go
|
@ -49,11 +49,11 @@ func main() {
|
|||
rp.Transport = &http.Transport{
|
||||
Proxy: http.ProxyURL(proxyUrl),
|
||||
}
|
||||
rp.Director = func(r *http.Request) {
|
||||
log.Printf("%s %s %s\n", r.RemoteAddr, r.Method, r.URL.String())
|
||||
}
|
||||
|
||||
err = http.ListenAndServe("0.0.0.0:"+strconv.Itoa(port), rp)
|
||||
err = http.ListenAndServe("0.0.0.0:"+strconv.Itoa(port), http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
|
||||
log.Printf("%s %s %s\n", r.RemoteAddr, r.Method, r.URL.String())
|
||||
rp.ServeHTTP(rw, r)
|
||||
}))
|
||||
if err != nil {
|
||||
log.Fatal(err.Error())
|
||||
return
|
||||
|
|
Reference in New Issue