Skip to content

feat: optional anonymous (public) pull via READONLY_ANONYMOUS - #135

Open
m-ferrero wants to merge 1 commit into
cloudflare:mainfrom
aggrega-ai:feat/readonly-anonymous
Open

m-ferrero wants to merge 1 commit into
cloudflare:mainfrom
aggrega-ai:feat/readonly-anonymous

Conversation

@m-ferrero

Copy link
Copy Markdown

Problem

There is no way to serve a fully public, read-only registry: every request requires credentials, even pulls. Closes #116.

Solution

Add an opt-in READONLY_ANONYMOUS flag (default off). When it is "true" and a request carries no Authorization header, the request is treated as holding only the pull capability, so GET/HEAD (manifests, blobs, referrers, tag listings) succeed without credentials. Write methods (POST/PUT/PATCH/DELETE) still require an authenticated push credential — an anonymous write is rejected with the usual WWW-Authenticate challenge. A request that does present an Authorization header always takes the normal credential path.

The flag defaults off, so existing deployments are unchanged.

Tests / docs

Adds tests covering anonymous GET/HEAD success and anonymous-write rejection, the example wrangler configs, and a README section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant