diff --git a/files/routes/allroutes.py b/files/routes/allroutes.py index b079c953f..af212e6e4 100644 --- a/files/routes/allroutes.py +++ b/files/routes/allroutes.py @@ -42,8 +42,6 @@ def before_request(): else: g.browser = 'chromium' - g.is_tor = request.headers.get("cf-ipcountry") == "T1" - request.path = request.path.rstrip('/') if not request.path: request.path = '/' request.full_path = request.full_path.rstrip('?').rstrip('/') diff --git a/files/routes/wrappers.py b/files/routes/wrappers.py index cd8bf93c6..39e37fd90 100644 --- a/files/routes/wrappers.py +++ b/files/routes/wrappers.py @@ -110,6 +110,8 @@ def get_logged_in_user(): g.is_api_or_xhr = bool((v and v.client) or request.headers.get("xhr")) + g.is_tor = (request.headers.get("cf-ipcountry") == "T1" and not (SITE_NAME == 'rDrama' and v and v.truescore >= 100)) + return v def auth_desired(f):