fix(admin): name the configured geo provider in the system snapshot

The admin system snapshot hardcoded "ipwho.is" for the offline-geo-off
state, so an operator who points IP_GEO_LOOKUP_URL at another provider
still read the wrong host. Resolve the actual provider host from the env
and surface it through /api/version, so the snapshot reads
"Online (ip-api.com)" — the host it really queries.
This commit is contained in:
Marc-André Bombeck committed 2026-06-30 18:08:57 +02:00
1 parent 6fe552ffdf
commit 45ca6ff24b
13 files changed
+98 -18

No files matched your search

+4
View File
@@ -500,6 +500,10 @@ export interface PublicVersion {
buildSha: string | null;
builtAt: string | null;
offlineGeoEnabled?: boolean;
// Host of the online geo provider the runtime falls back to when the
// offline tier is absent (host of IP_GEO_LOOKUP_URL, default ipwho.is).
// Optional so legacy /api/version responses still satisfy the shape.
geoProviderHost?: string;
}
/** Shared `/api/version` reader — the system-status section + overview
@@ -169,7 +169,9 @@ export function SystemStatusSection() {
value={
version.offlineGeoEnabled
? t("admin.offlineGeoEnabled")
: t("admin.offlineGeoFallback")
: t("admin.offlineGeoFallback", {
host: version.geoProviderHost ?? "ipwho.is",
})
}
className={
version.offlineGeoEnabled
@@ -106,7 +106,9 @@ export function SystemStatusSummary() {
value={
version.offlineGeoEnabled
? t("admin.overview.snapshotOfflineGeoOn")
: t("admin.overview.snapshotOfflineGeoOff")
: t("admin.overview.snapshotOfflineGeoOff", {
host: version.geoProviderHost ?? "ipwho.is",
})
}
className={
version.offlineGeoEnabled