The README Docker and nginx examples no longer set WEBHOOKER_ENVIRONMENT=prod, which is now the default. The TRUSTED_PROXIES warning text in the README, config.go and its test now gives the real reason it ignores the environment: behind a proxy every client shares one bucket in dev and prod alike. Model: opus-5-5
This commit is contained in:
@@ -400,10 +400,9 @@ the bucket is. See [Rate Limiting](#rate-limiting).
|
||||
|
||||
The remedy is to set `TRUSTED_PROXIES` to your reverse proxy's
|
||||
address, which restores per-client buckets. webhooker logs a warning
|
||||
at startup whenever `TRUSTED_PROXIES` is empty, in every environment —
|
||||
the warning does not depend on `WEBHOOKER_ENVIRONMENT`, because an
|
||||
operator who never configured the deployment is precisely the one at
|
||||
risk. The warning is informational when nothing proxies to the
|
||||
at startup whenever `TRUSTED_PROXIES` is empty, in every environment,
|
||||
because behind a proxy every client shares one bucket in `dev` and
|
||||
`prod` alike. The warning is informational when nothing proxies to the
|
||||
process: with no proxy in front, the peer address is the client's own
|
||||
and the buckets are already per-client. See
|
||||
[Rate Limiting](#rate-limiting) for what each limit shares.
|
||||
@@ -639,7 +638,6 @@ decision:
|
||||
docker run -d \
|
||||
-p 127.0.0.1:8080:8080 \
|
||||
-v /path/to/data:/var/lib/webhooker \
|
||||
-e WEBHOOKER_ENVIRONMENT=prod \
|
||||
-e BIND_ADDRESS=0.0.0.0 \
|
||||
webhooker:latest
|
||||
```
|
||||
@@ -856,7 +854,6 @@ sent — `$scheme` above does.
|
||||
With that block, webhooker's environment is:
|
||||
|
||||
```sh
|
||||
WEBHOOKER_ENVIRONMENT=prod
|
||||
BIND_ADDRESS=127.0.0.1 # the default; stated here to be explicit
|
||||
TRUSTED_PROXIES=127.0.0.1
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user