We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e521b32 commit 0014e72Copy full SHA for 0014e72
inertia/middleware.py
@@ -10,13 +10,13 @@ def __init__(self, get_response):
10
def __call__(self, request):
11
response = self.get_response(request)
12
13
- if not self.is_inertia_request(request):
14
- return response
15
-
16
# Inertia requests don't ever render templates, so they skip the typical Django
17
# CSRF path. We'll manually add a CSRF token for every request here.
18
get_token(request)
19
+ if not self.is_inertia_request(request):
+ return response
+
20
if self.is_non_post_redirect(request, response):
21
response.status_code = 303
22
0 commit comments