fix: resolve webhook client IP behind proxies
This commit is contained in:
@@ -36,5 +36,5 @@ PANEL_API_URL=https://panel.example.com/api
|
||||
PANEL_API_KEY=change_me
|
||||
PANEL_WEBHOOK_SECRET=change_me
|
||||
|
||||
# Caddy and Docker network ranges that may set X-Forwarded-For.
|
||||
TRUSTED_PROXIES=127.0.0.1,::1,172.16.0.0/12
|
||||
# Caddy and private Docker/LAN ranges that may set X-Forwarded-For.
|
||||
TRUSTED_PROXIES=127.0.0.1,::1,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,fc00::/7
|
||||
|
||||
@@ -8,12 +8,15 @@
|
||||
{$WEBHOOK_HOST} {
|
||||
encode zstd gzip
|
||||
|
||||
# Caddy sets X-Forwarded-For/Host/Proto for reverse_proxy by default.
|
||||
# The backend uses X-Forwarded-For for payment provider IP allowlists.
|
||||
reverse_proxy backend:8080
|
||||
}
|
||||
|
||||
{$MINIAPP_HOST} {
|
||||
encode zstd gzip
|
||||
|
||||
# Keep forwarded headers for Web App URL generation and request logging.
|
||||
reverse_proxy frontend:80
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ services:
|
||||
environment:
|
||||
<<: *app_environment
|
||||
WEBAPP_ENABLED: ${WEBAPP_ENABLED:-true}
|
||||
TRUSTED_PROXIES: ${TRUSTED_PROXIES:-127.0.0.1,::1,172.16.0.0/12}
|
||||
TRUSTED_PROXIES: ${TRUSTED_PROXIES:-127.0.0.1,::1,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,fc00::/7}
|
||||
volumes:
|
||||
- ./data:/app/data
|
||||
- ${COMPOSE_BACKUP_SOURCE:-.}:/app/compose-source:${COMPOSE_RESTORE_MODE:-rw}
|
||||
|
||||
Reference in New Issue
Block a user