Skip to content

Commit

Permalink
Merge pull request #141 from fsinfuhh/fix/wiki_redirect
Browse files Browse the repository at this point in the history
remove slashes only at start & end of path
  • Loading branch information
kritzl authored Oct 30, 2023
2 parents 557c101 + 2cfc4dd commit 05b1ff5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mafiasi/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def handler500(request):
def handler404(request, exception):
try:
apps.get_app_config("wiki")
path = str(request.path).replace("/", "", 2)
path = str(request.path).strip("/")
if "/" in path:
return HttpResponse("Page not found", status=404)

Expand Down

0 comments on commit 05b1ff5

Please sign in to comment.