Skip to content

Commit 2a82add

Browse files
committed
HOTFIX: Prevent 404's donation redirect
These exclusions can all be done with: Hx-headers='{"NoProcessHxRedirect": "true"}' However need to make some changes.
1 parent 05bd7ab commit 2a82add

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

raptorWeb/raptormc/hx_reroute_middleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def process_response(self, request: HttpRequest, response: HttpResponse) -> Http
1616

1717
# 404 the request if HX-Request is not true
1818
if ((request.headers.get('HX-Request') != "true") and ('/api/' in request.path)):
19-
if ('/login' not in request.path) and ('/logout' not in request.path):
19+
if ('/login' not in request.path) and ('/logout' not in request.path) and ('/redirect' not in request.path):
2020
return HttpResponseRedirect('/404')
2121

2222
return response

0 commit comments

Comments
 (0)