You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make the number of trusted reverse-proxy hops configurable via the
PROXY_FIX_HOPS env var (default 1, unchanged behaviour). With two hops in
front (e.g. Cloudflare then Traefik) the app's own login and audit logs
would otherwise record the intermediate proxy's IP.
The value is clamped to >= 0 (0 ignores X-Forwarded-For entirely), logged
at startup as Trusted Hops, and surfaced by the client IP diagnostic.
If you lose this key, existing TOTP secrets become unreadable and 2FA must be re-enrolled. Back up `.otp_key` alongside your config volume.
696
697
:::
698
+
699
+
---
700
+
701
+
### `PROXY_FIX_HOPS`
702
+
703
+
**Default:** `1`
704
+
705
+
How many trusted reverse-proxy hops sit in front of Traefik Manager. The app runs behind `ProxyFix`, which reads the client IP from the right of `X-Forwarded-For`; this value is how many positions it trusts. With a single proxy in front (Traefik → app) the default of `1` is correct. With two hops (e.g. Cloudflare → Traefik → app) the app's own login and audit logs would otherwise record the intermediate proxy's IP - set it to `2`.
706
+
707
+
The active value is shown in the startup log as `Trusted Hops` and in the Client IP Diagnostic.
708
+
709
+
:::tabs
710
+
== Docker / Podman
711
+
```yaml
712
+
environment:
713
+
- PROXY_FIX_HOPS=2
714
+
```
715
+
== Linux (systemd)
716
+
```ini
717
+
Environment=PROXY_FIX_HOPS=2
718
+
```
719
+
:::
720
+
721
+
::: warning
722
+
Only count hops you actually control. Each trusted hop is one more `X-Forwarded-For` entry a client could forge, so setting this higher than your real proxy chain lets callers spoof their source IP past the login rate-limiter and audit log. Set it to `0` to ignore `X-Forwarded-For` entirely and use the direct connection IP.
0 commit comments