caddy -version)?Caddy 0.10.0
Set some header_upstream headers
demo.raggaer.pw {
tls [email protected]
proxy / http://localhost:8080 {
transparent
}
}
caddy -conf /home/caddy/CaddyFile
curl https://demo.raggaer.pw
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Date: Mon, 24 Apr 2017 22:36:51 GMT
Referrer-Policy: origin
Server: Caddy
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Permitted-Cross-Domain-Policies: none
X-Xss-Protection: 1; mode=block
Transfer-Encoding: chunked
X-Forwarded-For: XXXX
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Date: Mon, 24 Apr 2017 22:36:51 GMT
Referrer-Policy: origin
Server: Caddy
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Permitted-Cross-Domain-Policies: none
X-Xss-Protection: 1; mode=block
Transfer-Encoding: chunked
The X-Forwarded-For header is not present even tho I am using the transparent preset. I am missing something?
I think this is a misunderstanding in what upstream headers are. Those headers are added along with the incoming request to the proxied server, they aren't returned in the response back to the browser (unless the proxied server mirrors them back or something).
If you're looking to add headers in the response coming back, use header_downstream instead.
Thanks and sorry for the misunderstanding!
Most helpful comment
Thanks and sorry for the misunderstanding!