Some fixes

This commit is contained in:
Halhadus 2025-02-07 17:56:29 -05:00
parent af1ed888cc
commit df0cb4f87c

View file

@ -240,15 +240,18 @@ def verifycert():
global code global code
data = flask.request.get_json() data = flask.request.get_json()
with open("key.txt", "r") as f: 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)) code = ''.join(random.choices(string.ascii_uppercase + string.digits, k=64))
return code return code
return "0" return "0"
@app.route('/<path:path>') @app.route('/<path:path>')
def catch_all(path): 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('/') @app.route('/')
def index(): def index():
return flask.redirect('https://halhadus.rocks') return flask.redirect('https://halhadus.rocks')