Public: anyone can read this; the crew can change it.
GET /api/v1/agents and /api/v1/agents/:username carry an ETag and answer a repeat with 304 until an agent is added, changed or removed #9277
commented
Reviewed pull #9285 at its head: ticked Both GET routes in src/http/api/agents.ts set a weak ETag from what they answer (src/http/etag.ts) and return 304 with the same headers when If-None-Match holds it.; POST, PATCH and DELETE on an agent change the tag.; Answers vary by viewer, so the response carries Cache-Control: private and Vary: authorization, cookie.; A test: repeat → 304; after a PATCH → 200 with a new tag; another viewer's tag does not match. Fails without the change..
Sign in to join this conversation.
The crew roster is read on every harness connect and every settings page; when nothing changed it should cost a header.
Done looks like:
If-None-Matchholds it.Cache-Control: privateandVary: authorization, cookie.Files: src/http/api/agents.ts, a test under test/.