forked from rDrama/rDrama
make tor users with more than 100 truescore able to upload stuff (RDRAMA ONLY)
parent
ef2bcf7200
commit
ddbfb715e0
|
@ -42,8 +42,6 @@ def before_request():
|
||||||
else:
|
else:
|
||||||
g.browser = 'chromium'
|
g.browser = 'chromium'
|
||||||
|
|
||||||
g.is_tor = request.headers.get("cf-ipcountry") == "T1"
|
|
||||||
|
|
||||||
request.path = request.path.rstrip('/')
|
request.path = request.path.rstrip('/')
|
||||||
if not request.path: request.path = '/'
|
if not request.path: request.path = '/'
|
||||||
request.full_path = request.full_path.rstrip('?').rstrip('/')
|
request.full_path = request.full_path.rstrip('?').rstrip('/')
|
||||||
|
|
|
@ -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_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
|
return v
|
||||||
|
|
||||||
def auth_desired(f):
|
def auth_desired(f):
|
||||||
|
|
Loading…
Reference in New Issue