File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -235,6 +235,7 @@ def __init__(
235235
236236 self .ip_address = utils .get_local_ip_address ()
237237 self .is_space = True if os .getenv ("SYSTEM" ) == "spaces" else False
238+ self .favicon_path = None
238239
239240 def render (self ):
240241 self ._id = Context .id
Original file line number Diff line number Diff line change @@ -192,6 +192,13 @@ def build_resource(path: str):
192192 return FileResponse (build_file )
193193 raise HTTPException (status_code = 404 , detail = "Build file not found" )
194194
195+ @app .get ("/favicon.ico" )
196+ async def favicon ():
197+ if app .blocks .favicon_path is None :
198+ return static_resource ("img/logo.svg" )
199+ else :
200+ return FileResponse (app .blocks .favicon_path )
201+
195202 @app .get ("/file/{path:path}" , dependencies = [Depends (login_check )])
196203 def file (path ):
197204 if (
You can’t perform that action at this time.
0 commit comments