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
Copy file name to clipboardExpand all lines: README.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,7 @@
47
47
- ADMIN_USERNAME=admin
48
48
- ADMIN_PASSWORD=<any password>
49
49
- PORT=8798
50
+
- TRUSTED_PROXIES=172.16.0.0/12 # the docker network traefik reaches OnLogs over, see below
50
51
# - ONLOGS_PATH_PREFIX=/onlogs if want to use with path prefix
51
52
52
53
labels:
@@ -93,6 +94,25 @@ Once done, just go to <your host> and login as "admin" with <any password>.
93
94
| MAX_LOGS_SIZE | Maximum allowed total logs size before cleanup triggers. Accepts human-readable formats like 5GB, 500MB, 1.5GB etc. When exceeded, 10% of logs (by count) will be removed proportionally across containers starting from oldest. Validated at startup: an unparseable value stops OnLogs rather than silently disabling retention | 10GB | -
94
95
| DISABLE_AUTH | Option to completely disable built in authentication in the application. When this option is set to `true` the app will behave like if the Administrator is logged in. The option to manage users will be removed. | false | -
95
96
| METRICS_TOKEN | Bearer token for the Prometheus endpoint at `/api/v1/metrics`. While it is unset the endpoint returns `401` and exposes nothing, so metrics are off by default. See [Metrics](#metrics) | | only for `/api/v1/metrics`
97
+
| TRUSTED_PROXIES | Peers allowed to name the client through `X-Forwarded-For` / `X-Real-IP`, as comma separated IPs and CIDR ranges. See [Behind a reverse proxy](#behind-a-reverse-proxy) | | only if behind nginx/traefik
98
+
99
+
## Behind a reverse proxy
100
+
101
+
Failed logins are rate limited per client address. Behind nginx or traefik every request
102
+
arrives from the proxy, so without `TRUSTED_PROXIES` all your users count as one client and
103
+
a single password sprayer locks out the rest. Set it to the addresses your proxy connects
104
+
from:
105
+
106
+
```
107
+
TRUSTED_PROXIES=172.16.0.0/12 # docker networks land here, so any containerised proxy does too
108
+
TRUSTED_PROXIES=127.0.0.1 # a proxy on the host
109
+
```
110
+
111
+
Keep the range as tight as your proxy allows — anything reaching OnLogs from a listed address
112
+
can call itself any client.
113
+
114
+
Make sure the proxy actually sends the headers — traefik does by default, nginx needs
0 commit comments