feat: add GET /api/instance-info endpoint

Implement new public endpoint that returns device name and version without authentication required. The auth exemption was already in place from task 4.
This commit is contained in:
Brian Krabach
2026-03-30 21:01:04 -07:00
parent e61efd141c
commit ca0eb44b88
2 changed files with 72 additions and 0 deletions
+11
View File
@@ -498,6 +498,17 @@ async def update_settings(request: Request) -> dict:
return patch_settings(body)
@app.get("/api/instance-info")
async def instance_info() -> dict:
"""Return this instance's display name and version.
Public endpoint (no auth required) — used by remote instances to
discover peer names and verify reachability.
"""
settings = load_settings()
return {"name": settings["device_name"], "version": app.version}
# ---------------------------------------------------------------------------
# WebSocket proxy — bridges browser to ttyd (eliminates Caddy dependency)
# ---------------------------------------------------------------------------