Added auth

This commit is contained in:
2022-05-29 00:31:32 +02:00
parent 36bb9eeefa
commit 23d514050d
19 changed files with 815 additions and 59 deletions

14
routers/frontend.py Normal file
View File

@ -0,0 +1,14 @@
import typing
from fastapi.staticfiles import StaticFiles
class SPAStaticFiles(StaticFiles):
async def get_response(self, path: str, scope: typing.Any):
response = await super().get_response(path, scope)
# Default back to `index.html` for our SPA
if response.status_code == 404:
response = await super().get_response(".", scope)
return response