fix route

master
Aevann 2024-10-26 23:43:19 +03:00
parent b3029969f3
commit cdb897f1dd
2 changed files with 3 additions and 3 deletions

View File

@ -17,14 +17,14 @@ def before_request():
if request.host != SITE:
stop(403, "Unauthorized host provided!")
if SITE == 'marsey.world' and request.path not in {'/kofi','/bm'}:
if SITE == 'marsey.world' and request.path not in {'/kofi','/bm','/av'}:
stop(404)
if request.headers.get("CF-Worker"):
stop(403, "Cloudflare workers are not allowed to access this website!")
g.agent = request.headers.get("User-Agent", "")
if not g.agent and request.path not in {'/kofi', '/bm'}:
if not g.agent and request.path not in {'/kofi','/bm','/av'}:
stop(403, 'Please use a "User-Agent" header!')
if not get_setting('bots') and request.headers.get("Authorization"):

View File

@ -1519,7 +1519,7 @@ def av():
print(ip, flush=True)
# if ip not in {'54.187.174.169','54.187.205.235','54.187.216.72'}:
# print(STARS, flush=True)
# print(f'/bm fail: {ip}')
# print(f'/av fail: {ip}')
# print(STARS, flush=True)
# stop(400)