Fix app route redirect issues

This commit is contained in:
LASER-Yi 2021-04-16 01:19:23 +08:00
parent 385cc214b3
commit c3c1891f56
1 changed files with 3 additions and 0 deletions

View File

@ -57,6 +57,9 @@ login_auth = settings.auth.type
update_notifier()
@app.errorhandler(404)
def page_not_found(e):
return redirect(base_url, code=302)
@app.route('/', defaults={'path': ''})
@app.route('/<path:path>')