diff options
author | Parker <contact@pkrm.dev> | 2024-11-03 16:31:15 -0600 |
---|---|---|
committer | Parker <contact@pkrm.dev> | 2024-11-03 16:31:15 -0600 |
commit | db1857a18f08ec47bc585c9c3c10b4a8fcb74f1f (patch) | |
tree | c9bfc8ea1a3fdd7eff64b5cc295e8c890e2643b2 /app/main.py | |
parent | de4dc0bc5b0196f09bb134df5374d169cc02b426 (diff) |
Make links case-insensitive
Diffstat (limited to 'app/main.py')
-rw-r--r-- | app/main.py | 3 |
1 files changed, 2 insertions, 1 deletions
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("/<link>", 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) |