feat(version): add self-hosted update check endpoint #193
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/pms-238-self-hosted-version-check"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Self-hosted operators can opt in to an update check by setting MOKOSH_UPDATE_CHECK_URL to a JSON manifest endpoint that publishes the latest released version. The new GET /api/v1/version/check handler fetches that manifest, compares the advertised version against the running build with a dependency-free semver-core comparison, and reports disabled / up_to_date / update_available / error. When the env var is unset the check reports disabled and makes no outbound request, so a stock install stays fully offline.
The probe config and its reqwest::Client are cached in a OnceLock with a sanitised display URL, mirroring the existing /ready Infisical probe so repeated polling reuses one connection pool and never echoes embedded credentials in error strings. A failed remote check returns 502 Bad Gateway; disabled and successful checks return 200 with Cache-Control: no-store.
#PMS-238