Integrate host app to main app (WIP).

This commit is contained in:
2025-12-04 10:00:47 +00:00
parent e102b8383b
commit a72349077c
2 changed files with 38 additions and 9 deletions
+1 -6
View File
@@ -76,14 +76,9 @@ async def restricted_view():
async def frontapp(request: Request, response: Response, auth=AUTH_COOKIE):
"""Serve the user profile app.
The frontend handles mode detection (host mode vs full profile) based on settings.
Access control is handled via APIs.
"""
cfg_host = hostutil.configured_auth_host()
if cfg_host:
cur_host = hostutil.normalize_host(request.headers.get("host"))
cfg_normalized = hostutil.normalize_host(cfg_host)
if cur_host and cfg_normalized and cur_host != cfg_normalized:
return Response(*await frontend.read("/int/host/index.html"))
return Response(*await frontend.read("/auth/index.html"))