From 8e63f75919f1aca30d5dc62cfcf0d8c027e8c8cd Mon Sep 17 00:00:00 2001 From: Soul Lee Date: Sun, 31 Aug 2025 18:59:07 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Update=20TrustedHostMiddleware?= =?UTF-8?q?=20Documentation=20(#11441)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com> Co-authored-by: Sofie Van Landeghem Co-authored-by: Sebastián Ramírez Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com> --- docs/en/docs/advanced/middleware.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/advanced/middleware.md b/docs/en/docs/advanced/middleware.md index 4ca07676b..d1be4afff 100644 --- a/docs/en/docs/advanced/middleware.md +++ b/docs/en/docs/advanced/middleware.md @@ -68,6 +68,7 @@ Enforces that all incoming requests have a correctly set `Host` header, in order The following arguments are supported: * `allowed_hosts` - A list of domain names that should be allowed as hostnames. Wildcard domains such as `*.example.com` are supported for matching subdomains. To allow any hostname either use `allowed_hosts=["*"]` or omit the middleware. +* `www_redirect` - If set to True, requests to non-www versions of the allowed hosts will be redirected to their www counterparts. Defaults to `True`. If an incoming request does not validate correctly then a `400` response will be sent.