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')