feat(backend): public /api/system/identity for pairing + site_id/lan_ip in status

GET /api/system/identity (unauthenticated, license-exempt) returns
{app: 'xenia-pos', site_id, venue_name, version, api_version: 1} so a phone
can confirm which venue a server is when pairing and when rediscovering the
server after an IP change. No secrets: SITE_KEY never leaves the server.
/api/system/status now also returns site_id and lan_ip (HOST_IP only - in
Docker any auto-detected address is the unreachable bridge IP).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-28 11:50:29 +03:00
co-authored by Claude Opus 5.5
parent 9fcb4df30e
commit 2d47530069
2 changed files with 32 additions and 2 deletions
+2 -2
View File
@@ -24,8 +24,8 @@ license_state: dict = {
"latest_version": None,
}
# Paths that bypass all license checks (health probe)
EXEMPT_PATHS = {"/api/system/health"}
# Paths that bypass all license checks (health probe, venue identity for pairing)
EXEMPT_PATHS = {"/api/system/health", "/api/system/identity"}
# Paths that are always allowed so the frontend can read license status
# and managers can still log in / close the workday when restricted