From ddbfb715e03e21bfee6127608c0e35676779fc9c Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 17 Sep 2023 21:49:44 +0300 Subject: [PATCH] make tor users with more than 100 truescore able to upload stuff (RDRAMA ONLY) --- files/routes/allroutes.py | 2 -- files/routes/wrappers.py | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) 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):