partially revert this for main

remotes/1693176582716663532/tmp_refs/heads/watchparty
justcool393 2022-10-12 09:01:43 -07:00
parent ee85b5577a
commit d04c170466
1 changed files with 2 additions and 2 deletions

View File

@ -85,8 +85,8 @@ def before_request():
with open('/site_settings.json', 'r', encoding='utf_8') as f:
app.config['SETTINGS'] = json.load(f)
if request.host != app.config["SERVER_NAME"]: abort(403, "Unauthorized host provided.")
if request.headers.get("CF-Worker"): abort(403, "Cloudflare workers are not allowed to access this website.")
if request.host != app.config["SERVER_NAME"]: return {"error": "Unauthorized host provided."}, 403
if request.headers.get("CF-Worker"): return {"error": "Cloudflare workers are not allowed to access this website."}, 403
if not app.config['SETTINGS']['Bots'] and request.headers.get("Authorization"): abort(403)