This commit is contained in:
Samuel Colvin
2023-11-30 17:37:01 +00:00
parent bd4fc47d4a
commit 2906ea1e8c

View File

@@ -248,3 +248,9 @@ async def sse_generator() -> AsyncIterable[str]:
@router.get('/sse')
async def sse_experiment() -> StreamingResponse:
return StreamingResponse(sse_generator(), media_type='text/event-stream')
@router.get('/{path:path}')
async def api_404():
# so we don't fall through to the index page
return {'message': 'Not Found'}