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:
Kevin Chung
2019-04-30 21:48:29 -04:00
committed by GitHub
parent 4ec45dc4bc
commit e7884c856f

View File

@@ -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: