From d9d3b7307070b53d87ed71e04665846e78529f84 Mon Sep 17 00:00:00 2001 From: Anna Sirota Date: Fri, 19 Mar 2021 10:28:28 +0100 Subject: [PATCH] Don't validate tokens for each static asset URL --- pillar/api/utils/authentication.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pillar/api/utils/authentication.py b/pillar/api/utils/authentication.py index e223a79e..51151adc 100644 --- a/pillar/api/utils/authentication.py +++ b/pillar/api/utils/authentication.py @@ -375,6 +375,10 @@ def current_user(): def setup_app(app): @app.before_request def validate_token_at_each_request(): + # Skip token validation if this is a static asset + # to avoid spamming Blender ID for no good reason + if request.path.startswith('/static/'): + return validate_token()