feat: PWA support — manifest, service worker, icons, public auth exemption
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -90,6 +90,18 @@ async def favicon():
|
||||
return Response(content=_FAVICON_SVG, media_type="image/svg+xml")
|
||||
|
||||
|
||||
@router.get("/sw.js", include_in_schema=False)
|
||||
async def service_worker():
|
||||
from fastapi.responses import FileResponse
|
||||
return FileResponse(str(_STATIC / "sw.js"), media_type="application/javascript")
|
||||
|
||||
|
||||
@router.get("/manifest.json", include_in_schema=False)
|
||||
async def web_manifest():
|
||||
from fastapi.responses import FileResponse
|
||||
return FileResponse(str(_STATIC / "manifest.json"), media_type="application/manifest+json")
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Root redirect
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user