zzz / openhands /server /static.py
ar08's picture
Upload 1040 files
246d201 verified
raw
history blame
389 Bytes
from fastapi.staticfiles import StaticFiles
class SPAStaticFiles(StaticFiles):
async def get_response(self, path: str, scope):
try:
return await super().get_response(path, scope)
except Exception:
# FIXME: just making this HTTPException doesn't work for some reason
return await super().get_response('index.html', scope)