From c94e31fdb0cf2c04635263ba46a22989df3aafbc Mon Sep 17 00:00:00 2001 From: Soul Lee Date: Mon, 15 Apr 2024 20:32:12 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Add=20'www=5Fredirect'=20argumen?= =?UTF-8?q?t=20in=20TrustedHostMiddleware=20docs=20to=20reflect=20its=20pr?= =?UTF-8?q?esence=20in=20the=20code.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 9219f1d2c..f45c5b959 100644 --- a/docs/en/docs/advanced/middleware.md +++ b/docs/en/docs/advanced/middleware.md @@ -69,6 +69,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.