mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-18 14:34:21 +01:00
Don't insert or check Tracking on static files or custom CSS (#976)
* No longer incur Tracking hits on theme files or custom CSS
This commit is contained in:
@@ -154,7 +154,9 @@ def init_request_processors(app):
|
||||
|
||||
@app.before_request
|
||||
def tracker():
|
||||
# TODO: This function shouldn't cause a DB hit for lookups if possible
|
||||
if request.endpoint in ('views.themes', 'views.custom_css'):
|
||||
return
|
||||
|
||||
if authed():
|
||||
track = Tracking.query.filter_by(ip=get_ip(), user_id=session['id']).first()
|
||||
if not track:
|
||||
|
||||
Reference in New Issue
Block a user