Configure Caddy to use PROXY protocol for X-Forwarded-For.

This commit is contained in:
Catherine
2025-09-21 14:27:25 +00:00
parent d4f5420875
commit e59699ab1a
2 changed files with 15 additions and 2 deletions
+12
View File
@@ -1,3 +1,13 @@
(proxy) {
listener_wrappers {
proxy_protocol {
timeout 1s
allow {$ALLOW_PROXY}
}
tls
}
}
{
persist_config off
@@ -33,11 +43,13 @@
servers :80 {
name http
protocols h1 h2c
import proxy
}
servers :443 {
name https
protocols h1 h2
import proxy
}
servers {$UDP_BIND_TO:0.0.0.0}:443 {