Add compatibility for a get request to /index.html
This commit is contained in:
parent
7c3d5008de
commit
099acd0ecc
@ -21,10 +21,17 @@ 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')
|
||||
|
||||
|
||||
@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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user