Add compatibility for a get request to /index.html

This commit is contained in:
Kosh 2023-10-18 12:59:24 +05:30 committed by Modo
parent 73770a1904
commit b9eea92668

View File

@ -23,11 +23,18 @@ def handle_first_launched():
=======
@app.route('/favicon.ico')
def favicon():
favicon_path = path.join(app.root_path, '../frontend/static', 'favicon.ico')
def favicon() -> Response:
favicon_path: str = path.join(app.root_path, '../frontend/static', 'favicon.ico')
return send_file(favicon_path, mimetype='image/vnd.microsoft.icon')
>>>>>>> d7982e1 (Add error message to login, Fix Internal Error 500)
@app.route("/index.html")
def handle_index() -> Response:
index_path: str = path.join(app.root_path, "../frontend/html", "index.html")
return send_file(index_path, mimetype="text/html")
@app.get("/")
@app.get("/<path:url_path>")
def handle_get(url_path: str = "html/index.html") -> Response: