From add7a35e5513e3059596ce6aff039a37007c37dd Mon Sep 17 00:00:00 2001 From: Kerry Su Date: Wed, 30 Dec 2020 11:45:52 +0800 Subject: [PATCH] b2: docs for download_url with private buckets The current authentication scheme works without creating a public download endpoint for a private bucket as in the B2 official blog. On the contrary, if the existing authorization header gets duplicated in the Cloudflare Workers script, one might receive 401 Unauthorized errors. --- backend/b2/b2.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/b2/b2.go b/backend/b2/b2.go index 08c4e0c3e..75589bfaf 100644 --- a/backend/b2/b2.go +++ b/backend/b2/b2.go @@ -155,7 +155,9 @@ to start uploading.`, This is usually set to a Cloudflare CDN URL as Backblaze offers free egress for data downloaded through the Cloudflare network. -This is probably only useful for a public bucket. +Rclone works with private buckets by sending an "Authorization" header. +If the custom endpoint rewrites the requests for authentication, +e.g., in Cloudflare Workers, this header needs to be handled properly. Leave blank if you want to use the endpoint provided by Backblaze.`, Advanced: true, }, {