Skip to content

Commit a507532

Browse files
authored
Version 0.31.0 (#2469)
1 parent 84dd2c4 commit a507532

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

CHANGELOG.md

+12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Change Log
22

3+
## 0.31.0 (2024-09-27)
4+
5+
### Added
6+
7+
Improve `ProxyHeadersMiddleware` (#2468) and (#2231):
8+
9+
- Fix the host for requests from clients running on the proxy server itself.
10+
- Fallback to host that was already set for empty x-forwarded-for headers.
11+
- Also allow to specify IP Networks as trusted hosts. This greatly simplifies deployments
12+
on docker swarm/kubernetes, where the reverse proxy might have a dynamic IP.
13+
- This includes support for IPv6 Address/Networks.
14+
315
## 0.30.6 (2024-08-13)
416

517
### Fixed

docs/deployment.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,8 @@ For more information, check [`ProxyHeadersMiddleware`](https://github.com/encode
385385

386386
### Client Port
387387

388-
Currently if the `ProxyHeadersMiddleware` is able to retrieve a trusted client value then the client's port will be set to `0`. This is because port information is lost when using these headers.
388+
Currently if the `ProxyHeadersMiddleware` is able to retrieve a trusted client value then the client's port will be set to `0`.
389+
This is because port information is lost when using these headers.
389390

390391
### UNIX Domain Sockets (UDS)
391392

@@ -396,7 +397,6 @@ For example:
396397
- when NGINX itself is running behind a UDS it will add the literal `unix:` as the client in the `X-Forwarded-For` header.
397398
- When Uvicorn is running behind a UDS the initial client will be `None`.
398399

399-
400400
### Trust Everything
401401

402402
Rather than specifying what to trust, you can instruct Uvicorn to trust all clients using the literal `"*"`.

uvicorn/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from uvicorn.config import Config
22
from uvicorn.main import Server, main, run
33

4-
__version__ = "0.30.6"
4+
__version__ = "0.31.0"
55
__all__ = ["main", "run", "Config", "Server"]

0 commit comments

Comments
 (0)