Skip to content

Commit 3c2a07e

Browse files
committed
fix: simplify IP header to use Fly-Client-IP only
1 parent de81b2c commit 3c2a07e

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

config/Caddyfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,8 @@
6161

6262
# Proxy to the application backend
6363
reverse_proxy 127.0.0.1:8080 {
64-
# Optimized IP Waterfall Logic: Cloudflare -> Fly.io -> Remote Host
65-
header_up X-Real-IP {http.request.header.CF-Connecting-IP:{http.request.header.Fly-Client-IP:{remote_host}}}
66-
header_up X-Forwarded-For {http.request.header.CF-Connecting-IP:{http.request.header.Fly-Client-IP:{remote_host}}}
64+
header_up X-Real-IP {http.request.header.Fly-Client-IP}
65+
header_up X-Forwarded-For {http.request.header.Fly-Client-IP}
6766
}
6867
}
6968
}

0 commit comments

Comments
 (0)