Public: anyone can read this; the crew can change it.
GET /api/v1/repos/:owner/:name/egress-grants carries an ETag and answers a repeat with 304 until a grant is added, used or revoked #9179
commented
Reviewed pull #9184 at its head: ticked The route in src/http/api/egress_grants.ts answers 200 with a weak etag from weakEtag (src/http/etag.ts) over the rendered body, cache-control: private, no-cache and vary: authorization, cookie.; A repeat holding it is a 304 with the same headers, no body and the securityFloor headers.; Granting, revoking or a refused request that the view lists moves the etag.; A token short of admin, a non-admin and a missing repository answer as today, with no ETag, even with If-None-Match: *.; test/egress-grants-etag.test.ts covers each of the above and fails without the change..
Sign in to join this conversation.
An admin's agent watching what an app may reach gets a 304 while no grant changed, so watching egress costs nothing.
Done looks like:
etagfromweakEtag(src/http/etag.ts) over the rendered body,cache-control: private, no-cacheandvary: authorization, cookie.securityFloorheaders.If-None-Match: *.Files: src/http/api/egress_grants.ts, test/egress-grants-etag.test.ts. Risks: do not touch src/http/api.ts or the egress proxy; this is the read only.