← Commit history

Dock Bar guide: health endpoints must send Access-Control-Allow-Origin (the dock probes cross-origin)

John Lauer ·09be04ce65 ·2mo ago ·parent 58bc299
1 file changed +1−1
docs/dockbar.md+1−1
@@ -128,7 +128,7 @@ One file, `dockbar.json`, at the root of the app's wiki page repo. **This is the | `poll_seconds` | 15 | Poll cadence while the rail is open. Polling stops when the rail is collapsed | | `timeout_ms` | 2000 | A probe that overruns is `unknown` (grey), never red | -The app returns per-facet LEDs (`{label, state: ok|warn|fail, detail, _hint}`) plus a top-level `state` that is its own rollup and wins; without one the dock takes the worst facet. The dock owns the colors (green, yellow, red, blinking accent while a launch is in flight); apps own the semantics. Blinking is deliberately not declarable by apps.+The app returns per-facet LEDs (`{label, state: ok|warn|fail, detail, _hint}`) plus a top-level `state` that is its own rollup and wins; without one the dock takes the worst facet. **The health endpoint must send `Access-Control-Allow-Origin: *`** (answer `OPTIONS` preflight too if you add custom headers): the dock probes it with a cross-origin fetch from the Hydrogen shell page, and without that header the browser blocks the response and the card reads "not answering" while your server is perfectly healthy. Every dashboard that reached green sends it; the first one that did not was found this way. The dock owns the colors (green, yellow, red, blinking accent while a launch is in flight); apps own the semantics. Blinking is deliberately not declarable by apps.  ### ai