forked from rDrama/rDrama
partially revert this for main
parent
ee85b5577a
commit
d04c170466
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue