Comments in reqtls and session, and the README Quick Start and deployment checklist, still spoke as if an unset WEBHOOKER_ENVIRONMENT meant dev. The checklist now asks only that the environment is not dev (unset or prod); the Quick Start describes running from the clone. Model: opus-5-5
This commit is contained in:
@@ -44,9 +44,9 @@ make bootstrap
|
||||
# Run all checks (test, lint, format check)
|
||||
make check
|
||||
|
||||
# Run in development mode. DATA_DIR defaults to /var/lib/webhooker in
|
||||
# every environment, so set it (in .env or the shell) to a writable
|
||||
# directory when running from a clone.
|
||||
# Run the server from the clone. DATA_DIR defaults to
|
||||
# /var/lib/webhooker in every environment, so set it (in .env or the
|
||||
# shell) to a writable directory.
|
||||
DATA_DIR=./data make dev
|
||||
|
||||
# Build Docker image
|
||||
@@ -753,17 +753,18 @@ reports.
|
||||
serves the admin login form and the unauthenticated receiver with
|
||||
no TLS at all, and the proxy in front of it changes nothing about
|
||||
that.
|
||||
2. **Set `WEBHOOKER_ENVIRONMENT=prod`, and make sure the proxy sends
|
||||
`X-Forwarded-Proto`.** These are two requirements, not one. The
|
||||
environment setting decides CORS and nothing else: `dev` answers
|
||||
every origin with `Access-Control-Allow-Origin: *` (without
|
||||
credentials), which a server-rendered production deployment has no
|
||||
use for, and `prod` — the default — disables it. Cookie `Secure`
|
||||
and the strict Origin/Referer mode are **not** tied to it — they
|
||||
are decided per request from the transport, which behind a proxy
|
||||
means the `X-Forwarded-Proto` header. The block below sets it;
|
||||
without it every request is read as plaintext and cookies ship
|
||||
without `Secure`. See [Configuration](#configuration).
|
||||
2. **Make sure the environment is not `dev` (leave
|
||||
`WEBHOOKER_ENVIRONMENT` unset or set it to `prod`), and make sure
|
||||
the proxy sends `X-Forwarded-Proto`.** These are two requirements,
|
||||
not one. The environment setting decides CORS and nothing else:
|
||||
`dev` answers every origin with `Access-Control-Allow-Origin: *`
|
||||
(without credentials), which a server-rendered production
|
||||
deployment has no use for, and `prod` — the default — disables it.
|
||||
Cookie `Secure` and the strict Origin/Referer mode are **not** tied
|
||||
to it — they are decided per request from the transport, which
|
||||
behind a proxy means the `X-Forwarded-Proto` header. The block below
|
||||
sets it; without it every request is read as plaintext and cookies
|
||||
ship without `Secure`. See [Configuration](#configuration).
|
||||
3. **Set `TRUSTED_PROXIES` to the proxy's address.** Unset, every rate
|
||||
limiter keys on the connecting peer, which behind a proxy is the
|
||||
proxy on every request: all clients collapse into one global bucket
|
||||
|
||||
Reference in New Issue
Block a user