amend previous

pull/1/head
justcool393 2022-11-29 19:31:28 -06:00
parent 883be4019c
commit c315a2a259
1 changed files with 2 additions and 2 deletions

View File

@ -17,11 +17,11 @@ def before_request():
if SITE == 'marsey.world' and request.path != '/kofi':
abort(404)
g.agent = request.headers.get("User-Agent")
g.agent = request.headers.get("User-Agent", "")
if not g.agent and request.path != '/kofi':
return 'Please use a "User-Agent" header!', 403
ua = (g.agent or '').lower()
ua = g.agent.lower()
if request.host != SITE:
return {"error": "Unauthorized host provided"}, 403