2 Commits
Author SHA1 Message Date
Harmon 46d83145d9 Keep the admin surface local while serving tiles on the LAN
Binding to 0.0.0.0 used to demand credentials because the admin console and
the tile routes shared one listener. That forced a choice between keeping the
console off the network and letting other machines fetch tiles.

Admin routes are now loopback-only by default: the service can bind 0.0.0.0 so
/tiles, /vectors, the catalog and the probes reach the LAN, while /admin and
/api/v1/admin answer 403 to anything arriving from another host. Credentials
are only required when ADMIN_ALLOW_REMOTE=true actually opens the console up,
which is the case worth guarding.

Tests cover both sides: a remote admin request is refused, a remote tile
request still reaches the token check.
2026-10-16 10:41:32 +08:00
Harmon 93bfd406ba Add a calling guide for the API
docs/API.md covers authentication (admin credentials vs service tokens and
their scopes), every public endpoint grouped by purpose, the slicing request
and job shape, the completion callback, error codes, and the checklist for
exposing the console to the LAN.
2026-10-16 10:38:32 +08:00