Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/install/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,27 @@ contains the same public host as `APP_URL`, including its port when one is used.
- `SANCTUM_STATEFUL_DOMAINS=invoiceshelf.acme.com,invoiceshelf.acme.com:8080`
- `SANCTUM_STATEFUL_DOMAINS=localhost,localhost:3000,invoiceshelf.acme.com`

#### TRUSTED_PROXIES
Which upstream proxies may rewrite the client address, host, port and scheme. The default
`*` trusts every hop, which is what you want for a container behind a reverse proxy you
control.

If you narrow it, list the address **the container actually sees**, which is normally the
Docker bridge gateway (`172.x.x.x`) and not your proxy's LAN address. Getting this wrong
makes InvoiceShelf discard the proxy's `X-Forwarded-Proto` header and fall back to
generating `http://` links behind an https site, which shows up as a failed sign-in that
works after a page refresh.
- **Examples**:
- `TRUSTED_PROXIES=*` (default)
- `TRUSTED_PROXIES=172.18.0.1`

For example, a reverse-proxied installation at `https://invoices.example.com` uses:

```yaml
- APP_URL=https://invoices.example.com
- SESSION_DOMAIN=invoices.example.com
- SANCTUM_STATEFUL_DOMAINS=invoices.example.com
- TRUSTED_PROXIES=*
```

Restart the stack after changing these variables.
Expand Down
Loading