jlelse
/
ProxyExposer
Archived
1
Fork 0

Add logging
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Jan-Lukas Else 2021-10-30 12:38:16 +02:00
parent cdc62c50c5
commit 6dca5c5286
1 changed files with 5 additions and 1 deletions

View File

@ -49,7 +49,11 @@ func main() {
rp.Transport = &http.Transport{
Proxy: http.ProxyURL(proxyUrl),
}
err = http.ListenAndServe(":"+strconv.Itoa(port), rp)
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)
if err != nil {
log.Fatal(err.Error())
return