mirror of
https://github.com/wassname/ray.git
synced 2026-07-03 04:20:14 +08:00
Add route for /favicon.ico to fix missing favicon (#6815)
This commit is contained in:
committed by
Edward Oakes
parent
232be5a058
commit
8e8b66a4b8
@@ -128,6 +128,12 @@ class Dashboard(object):
|
||||
os.path.dirname(os.path.abspath(__file__)),
|
||||
"client/build/index.html"))
|
||||
|
||||
async def get_favicon(req) -> aiohttp.web.Response:
|
||||
return aiohttp.web.FileResponse(
|
||||
os.path.join(
|
||||
os.path.dirname(os.path.abspath(__file__)),
|
||||
"client/build/favicon.ico"))
|
||||
|
||||
async def json_response(result=None, error=None,
|
||||
ts=None) -> aiohttp.web.Response:
|
||||
if ts is None:
|
||||
@@ -249,6 +255,7 @@ class Dashboard(object):
|
||||
return await json_response(result=result)
|
||||
|
||||
self.app.router.add_get("/", get_index)
|
||||
self.app.router.add_get("/favicon.ico", get_favicon)
|
||||
|
||||
static_dir = os.path.join(
|
||||
os.path.dirname(os.path.abspath(__file__)), "client/build/static")
|
||||
|
||||
Reference in New Issue
Block a user