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
|
||||
|
||||
# Nginx and Docker network ranges that may set X-Forwarded-For.
|
||||
TRUSTED_PROXIES=127.0.0.1,::1,172.16.0.0/12
|
||||
# Nginx 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
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -31,6 +31,7 @@ server {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
# Required for payment provider IP allowlists in webhook handlers.
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
Reference in New Issue
Block a user