-
Notifications
You must be signed in to change notification settings - Fork 15.4k
add r2 public bucket local support #31767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: production
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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. | ||
|
|
||
| Bindings configured with `remote: true` are not exposed. The endpoint supports `GET` and `HEAD`, range requests, conditional headers, and forwards stored HTTP metadata. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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:
|
||
|
|
||
| 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. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider tightening this to remove filler words and improve readability:
(You could also wrap this in a
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ^ this |
||
There was a problem hiding this comment.
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_UNDERSCORESinside angle brackets.Please change:
<bucket-id>→<BUCKET_ID><key>→<KEY>(or<OBJECT_KEY>)