Spaces:
Configuration error
Configuration error
File size: 379 Bytes
2d63f96 | 1 2 3 4 5 6 7 8 9 10 11 | 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)
|