Skip to content

Commit

Permalink
Try to debug redirect loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-Simulacrum committed Feb 28, 2024
1 parent 7ffa187 commit 8dc76af
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions homu/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1042,6 +1042,8 @@ def redirect_to_canonical_host():
elif redirect_url.path == "/" + prefix:
redirect_url = redirect_url._replace(path="/")

print("request_url=", request_url)
print("redirect_url=", redirect_url)
if request_url != redirect_url:
redirect(urllib.parse.urlunparse(redirect_url), 301)

Expand Down

0 comments on commit 8dc76af

Please sign in to comment.