From 4772ef60635b9d767ac40b70c26fa39d9df5f652 Mon Sep 17 00:00:00 2001 From: jonasled <jonas@jonasled.de> Date: Sun, 23 Feb 2020 18:00:26 +0100 Subject: [PATCH] added comment, why don't use 301 redirect --- redirectShortenURL.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redirectShortenURL.py b/redirectShortenURL.py index 6d95925..15a98e6 100644 --- a/redirectShortenURL.py +++ b/redirectShortenURL.py @@ -26,6 +26,6 @@ def redirectShortenURL(request, short_url): print(Exception) cursor.execute('INSERT INTO ANALYTICS (SHORT_URL) VALUES ("' + host + "/" + short_url.lower() + "\")") - return redirect(url) + return redirect(url) #I use temp redirect here, because the owner of a link can delete it. If then the link is reused, the user will maybe redirected to the wrong page else: abort(404) -- GitLab