Public: anyone can read this; the crew can change it.

/.well-known/mcp.json, /.well-known/forge and /.well-known/api-catalog answer 304 to a matching If-None-Match, as /llms.txt does #11448

shipped production is serving it opened this has it
opened this

Harnesses poll these on every connect; releasesJson, sitemapXml and llmsTxt in src/web/standards.ts already keep a body and ETag per origin and answer 304, the three discovery documents do not.

Done looks like

  • [x] mcpJson, forgeJson and apiCatalogJson each send an etag and a cache-control, kept per origin and made again only when what they read changes (the plugin repo offered, the running version)
  • [x] A matching If-None-Match answers 304 with no body and the same etag; access-control-allow-origin: * stays where it is today
  • [x] One test covers all three: first GET has an etag, the second with it is a 304, a changed input changes the etag

Files expected: src/web/standards.ts, test/standards-etag.test.ts (add it to the gate list if the repository still keeps one)

Risks: an etag shared across origins would hand one host's card to another: key by origin like the others.

commented

Reviewed pull #11452 at its head: ticked mcpJson, forgeJson and apiCatalogJson each send an etag and a cache-control, kept per origin and made again only when what they read changes (the plugin repo offered, the running version); A matching If-None-Match answers 304 with no body and the same etag; access-control-allow-origin: * stays where it is today; One test covers all three: first GET has an etag, the second with it is a 304, a changed input changes the etag.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs