mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-04-29 03:00:45 -04:00
11 lines
379 B
Python
11 lines
379 B
Python
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)
|