-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Closed
Copy link
Labels
upstream ⬆️Relates to some dependency of this projectRelates to some dependency of this project
Description
I recently moved over to Caddy as a frontend for one of my sites.
Extract of the Caddyfile:
example.com {
header Strict-Transport-Security "max-age=63072000"
header -Server
handle_path /forum/* {
reverse_proxy http://<host2>:8000
}
reverse_proxy h2c://<docker_container_name>:80 {
transport http {
proxy_protocol v2
}
}
}
When configured as above, after a random number of hits, the source IP addresses logged in the reverse proxy will all be the same. This includes ANY host - IPv4 or IPv6.
Changing to use http:// as the backend as follows seems to report the source IP address correctly:
example.com {
header Strict-Transport-Security "max-age=63072000"
header -Server
handle_path /forum/* {
reverse_proxy http://<host2>:8000
}
reverse_proxy http://<docker_container_name>:80 {
transport http {
proxy_protocol v2
}
}
}
Versions:
/srv # caddy --version
v2.7.6 h1:w0NymbG2m9PcvKWsrXO6EEkY9Ru4FJK8uQbYcev1p3A=
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
upstream ⬆️Relates to some dependency of this projectRelates to some dependency of this project