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
23 changes: 23 additions & 0 deletions docs/docs/deployment/hosting/locally-edge-proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,27 @@ Optionally, specify the LRU cache size with `cache_max_size`. Defaults to 128.
}
```

### Server settings

#### `server.proxy_headers`

When set to `true`, the Edge Proxy will use the `X-Forwarded-For` and `X-Forwarded-Proto` HTTP headers to determine
client IP addresses. This is useful if the Edge Proxy is running behind a reverse proxy, and you want the
[access logs](#logging.override) to show the real IP addresses of your clients.

By default, only the loopback address is trusted. This can be changed with the [`FORWARDED_ALLOW_IPS` environment
variable](#environment-variables).

```json
"server": {
"proxy_headers": true
}
```

```
SERVER_PROXY_HEADERS=true
```

### Logging

#### `logging.log_level`
Expand Down Expand Up @@ -286,3 +307,5 @@ Some Edge Proxy settings can only be set using environment variables:
- `HTTP_PROXY`, `HTTPS_PROXY`, `ALL_PROXY`, `NO_PROXY`: These variables let you configure an HTTP proxy that the
Edge Proxy should use for all its outgoing HTTP requests.
[Learn more](https://www.python-httpx.org/environment_variables)
- `FORWARDED_ALLOW_IPS`: Which IPs to trust for determining client IP addresses when using the `proxy_headers` option.
For more details, see the [Uvicorn documentation](https://www.uvicorn.org/settings/#http).