Add compatibility for a get request to /index.html
This commit is contained in:
parent
73770a1904
commit
b9eea92668
@ -23,11 +23,18 @@ def handle_first_launched():
|
|||||||
=======
|
=======
|
||||||
|
|
||||||
@app.route('/favicon.ico')
|
@app.route('/favicon.ico')
|
||||||
def favicon():
|
def favicon() -> Response:
|
||||||
favicon_path = path.join(app.root_path, '../frontend/static', 'favicon.ico')
|
favicon_path: str = path.join(app.root_path, '../frontend/static', 'favicon.ico')
|
||||||
return send_file(favicon_path, mimetype='image/vnd.microsoft.icon')
|
return send_file(favicon_path, mimetype='image/vnd.microsoft.icon')
|
||||||
>>>>>>> d7982e1 (Add error message to login, Fix Internal Error 500)
|
>>>>>>> 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("/")
|
||||||
@app.get("/<path:url_path>")
|
@app.get("/<path:url_path>")
|
||||||
def handle_get(url_path: str = "html/index.html") -> Response:
|
def handle_get(url_path: str = "html/index.html") -> Response:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user