Hi,
I wanted to know the client’s request info like Remote Host, URI when I use Caddy as the Forward Proxy.
For example, curl https://caddyserver.com/docs/tls -x http://localhost:8080
. I want to see the Remote Host is caddyserver.com
, the method and URI are GET /docs/tls
.
The normal logging will only log the Proxy Request which will show the Remote Host is the Caddy Server itself (localhost ::1 in this case)
::1 - - [27/Feb/2019:15:03:34 +0800] "CONNECT / HTTP/1.1" 200 0 "-" "curl/7.54.0"
I tried to use this config
localhost:8080
log / stdout "{combined}"
# Enable forwardproxy
forwardproxy {
log / stdout "{combined}"
}
I’ve got the error
2019/02/27 15:00:35 Caddyfile:5 - Error during parsing: Wrong argument count or unexpected line ending after '{combined}'