docs(readme): document the mc-status server-status JSON endpoint
Describe the self-hosted mc-status pinger (mcstatus.io v2 JSON, same-origin via caddy /api/mcstatus/* → mc-status:8080) that the landing ServerCard reads, with the apex endpoint and a direct-to-caddy curl example. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
26
README.md
26
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.
|
||||
|
||||
Reference in New Issue
Block a user