Skip to content

Commit 757f992

Browse files
committed
Update note about APPEND_SLASH
In Django 4.2, the redirect only happens in `process_response`, so Wagtail kicks in first.
1 parent 71082cc commit 757f992

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

text/093-redirect-improvements.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* RFC: 93
44
* Author: Jake Howard
55
* Created: 2024-02-22
6-
* Last Modified: 2024-02-22
6+
* Last Modified: 2024-03-01
77

88
## Meta Abstract
99

@@ -55,7 +55,7 @@ However, this also means redirects happen much later than may be expected. To ma
5555

5656
An `is_eager` column will be added to a `Redirect`, which flags whether the redirect should run before the rest of the Wagtail page process, or afterwards (as they would currently). `is_eager` will default to `False`, to ensure it's not a breaking change, or impact other site behaviours.
5757

58-
To properly support `is_eager`, the `RedirectMiddleware` will also need bringing up the `MIDDLEWARES` list, below incredibly high middleware such as `SecurityMiddleware`, `GzipMiddleware` and `WhitenoiseMiddleware`, but still as high as possible. For redirects to apply before Django's `APPEND_SLASH` functionality, and thus keep the redirect chains short, the `RedirectMiddleware` must come before `CommonMiddleware`.
58+
To properly support `is_eager`, the `RedirectMiddleware` will also need bringing up the `MIDDLEWARES` list, below incredibly high middleware such as `SecurityMiddleware`, `GzipMiddleware` and `WhitenoiseMiddleware`, but still as high as possible. Unfortunately, this will impact performance, as a database query will need to be made for redirects on every request.
5959

6060
A Django check will be added to warn users when `RedirectMiddleware` is placed below `CommonMiddleware`.
6161

0 commit comments

Comments
 (0)