Fix redirecting

This commit is contained in:
Parker M. 2024-08-07 16:07:45 -05:00
parent 143378ce4b
commit cf6acce120
No known key found for this signature in database
GPG Key ID: 95CD2E0C7E329F2A

View File

@ -15,6 +15,7 @@ import random
from models import User
from database import *
from app.util.log import log
from var import BASE_URL
class FlaskUser(UserMixin):
@ -140,7 +141,7 @@ Log all records for visits to shortened links
def log_redirect(link):
# If the `link` is more than 5 characters, ignore
if len(link) > 5:
return
return redirect(BASE_URL)
# If the `link` is one of the registered routes, ignore
if link in ["login", "signup", "dashboard", "logout", "api"]: