diff --git a/python/ray/dashboard/dashboard.py b/python/ray/dashboard/dashboard.py index 47128064a..eeb6a8aac 100644 --- a/python/ray/dashboard/dashboard.py +++ b/python/ray/dashboard/dashboard.py @@ -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")