diff --git a/README.md b/README.md index 580e36b..d6245bc 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,32 @@ down" from "ingress/TLS/DNS down"; public-URL targets test the whole chain. `status` is in the default `LE_SUBDOMAINS`; the nginx vhost adds websocket upgrade headers for Kuma's live UI. +## Server status JSON (mc-status) + +`mc-status` is a self-hosted SLP→JSON pinger (built from `docker/mc-status`, an +mcutil wrapper) that the landing's `ServerCard` reads for live player count + MOTD. +It emits **mcstatus.io v2** JSON, so the card consumes it unchanged — but +same-origin, with no CORS and no third-party calls. caddy proxies the apex +`/api/mcstatus/*` path to `mc-status:8080` (strips the prefix); the container has +no published port. The pinger only ever probes its configured `MC_STATUS_TARGET`, +so the path after the prefix is ignored. + +Endpoint (apex, same-origin): + +``` +https://${BASE_DOMAIN}/api/mcstatus/v2/status/java/${BASE_DOMAIN} +``` + +Hitting caddy directly (localhost-only, routes by Host header) — e.g. `ulicraft.net` +on `127.0.0.1:8880`: + +```sh +curl -H "Host: ulicraft.net" \ + http://127.0.0.1:8880/api/mcstatus/v2/status/java/ulicraft.net +``` + +Wired in `landing/src/data/site.ts` (`statusApi`) and `caddy/conf.d/10-static.caddy`. + ## Join (guests) 1. Open `https://${BASE_DOMAIN}`, download FjordLauncherUnlocked for your OS.