From db1857a18f08ec47bc585c9c3c10b4a8fcb74f1f Mon Sep 17 00:00:00 2001 From: Parker Date: Sun, 3 Nov 2024 16:31:15 -0600 Subject: Make links case-insensitive --- app/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/main.py b/app/main.py index e379d21..c58a45f 100644 --- a/app/main.py +++ b/app/main.py @@ -154,7 +154,8 @@ Log all records for visits to shortened links @app.route("/", methods=["GET"]) -def log_redirect(link): +def log_redirect(link: str): + link = link.upper() # If `link` is not exactly 5 characters, return redirect to base url if len(link) != 5: return redirect(BASE_URL) -- cgit v1.2.3-70-g09d2