From df0cb4f87c73dda223f80eae634b81981d1a5429 Mon Sep 17 00:00:00 2001 From: Halhadus Date: Fri, 7 Feb 2025 17:56:29 -0500 Subject: [PATCH] Some fixes --- websitepart.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/websitepart.py b/websitepart.py index 2873486..49beebf 100644 --- a/websitepart.py +++ b/websitepart.py @@ -240,15 +240,18 @@ def verifycert(): global code data = flask.request.get_json() with open("key.txt", "r") as f: - if data.get('key') == f.read().strip(): + if data.get('key') == f.read(): code = ''.join(random.choices(string.ascii_uppercase + string.digits, k=64)) return code return "0" @app.route('/') def catch_all(path): - return flask.redirect(f'https://halhadus.rocks/{path}') - + if path == None: + return flask.redirect('https://halhadus.rocks') + if not path == 'musicstatus.html' or not path == 'verifykey': + return flask.redirect(f'https://halhadus.rocks/{path}') + @app.route('/') def index(): return flask.redirect('https://halhadus.rocks')