- Новая
опциональная .env переменная – TRUST_PROXY (PR #49) . Используется для настройки определения корректного IP-адреса входящего запроса и защиты от спуфинга.
Конфигурируется через .env переменную TRUST_PROXY (документация Express, документация Remnawave). По умолчанию – 1.
# Express `trust proxy` setting, used so the real client IP is resolved from
# the trusted hop and cannot be spoofed via X-Forwarded-For. Accepts:
# - "true" / "false" -> trust all / none
# - a non-negative integer (e.g. 1, 2) -> number of trusted hops
# - a comma-separated list of preset names -> loopback, linklocal, uniquelocal
# and/or IP addresses / CIDR subnets -> e.g. 127.0.0.1, 172.16.0.0/12
# See https://expressjs.com/en/guide/behind-proxies/
TRUST_PROXY=1
1 Like