Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/content/docs/r2/buckets/public-buckets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,11 @@ To disable public access for your bucket:
2. On the bucket page, select **Settings**.
3. Under **Public Development URL**, select **Disable**.
4. In **Disallow Public Access?**, type `disallow` to confirm and select **Disallow**.

## Local development

When [developing locally](/workers/local-development), objects are served under `/cdn-cgi/local/r2/public/<bucket-id>/<key>`, where `<bucket-id>` is the bucket's `bucket_name` as set in your Wrangler config. If `bucket_name` is not set, this is the `binding` name.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style guide: variable placeholders should use ALL_CAPS_UNDERSCORES inside angle brackets.

Please change:

  • <bucket-id><BUCKET_ID>
  • <key><KEY> (or <OBJECT_KEY>)


Bindings configured with `remote: true` are not exposed. The endpoint supports `GET` and `HEAD`, range requests, conditional headers, and forwards stored HTTP metadata.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This list reads a little ambiguously — it sounds like the endpoint “supports … forwards stored HTTP metadata.” Consider splitting the sentence for clarity:

The endpoint supports GET and HEAD, range requests, and conditional headers. It also forwards stored HTTP metadata.


Note this is always available locally, regardless of whether or not you have actually enabled public access for this bucket. Recall that by default, buckets are in fact _not_ publicly accessible over the Internet.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider tightening this to remove filler words and improve readability:

Note that this endpoint is always available locally, regardless of whether you have enabled public access for the bucket. By default, buckets are not publicly accessible over the Internet.

(You could also wrap this in a :::note admonition since it is supplementary info.)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ this