Skip to content

Commit 01d01ed

Browse files
committed
server: send a 301 during canonical url redirects
1 parent bd85a67 commit 01d01ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

homu/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ def redirect_to_canonical_host():
980980
redirect_url = redirect_url._replace(path="/")
981981

982982
if request_url != redirect_url:
983-
redirect(urllib.parse.urlunparse(redirect_url))
983+
redirect(urllib.parse.urlunparse(redirect_url), 301)
984984

985985

986986
def start(cfg, states, queue_handler, repo_cfgs, repos, logger,

0 commit comments

Comments
 (0)