From 50df1a6f2ca5bf6eb84cd182b6aae507718afd3b Mon Sep 17 00:00:00 2001 From: Deimos Date: Thu, 20 Dec 2018 16:50:51 -0700 Subject: [PATCH] Shortener: redirect with domain included --- tildes/tildes/views/shortener.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tildes/tildes/views/shortener.py b/tildes/tildes/views/shortener.py index e6c363b..c6c8bd8 100644 --- a/tildes/tildes/views/shortener.py +++ b/tildes/tildes/views/shortener.py @@ -20,10 +20,10 @@ def get_shortener(request: Request) -> Response: @view_config(route_name="shortener_group", permission=NO_PERMISSION_REQUIRED) def get_shortener_group(request: Request) -> HTTPFound: """Redirect to the base path of a group.""" - raise HTTPFound(location=f"/~{request.context.path}") + raise HTTPFound(location=f"https://tildes.net/~{request.context.path}") @view_config(route_name="shortener_topic", permission=NO_PERMISSION_REQUIRED) def get_shortener_topic(request: Request) -> HTTPFound: """Redirect to the full permalink for a topic.""" - raise HTTPFound(location=request.context.permalink) + raise HTTPFound(location=f"https://tildes.net{request.context.permalink}")