Some fixes
This commit is contained in:
parent
af1ed888cc
commit
df0cb4f87c
1 changed files with 6 additions and 3 deletions
|
@ -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')
|
||||||
|
|
Loading…
Add table
Reference in a new issue