feat: add PUBLIC_READ_BUCKETS support to allow unauthenticated GET and HEAD requests

This commit is contained in:
Musenxi
2026-04-12 01:54:29 +08:00
parent a353f63b5f
commit b98684c87a
3 changed files with 99 additions and 3 deletions
+1
View File
@@ -68,6 +68,7 @@ https://developers.cloudflare.com/workers/configuration/secrets/#via-the-dashboa
| `REGION` | The region used by the S3 client. |
| `GOOGLE_CLIENT_ID`, `GOOGLE_CLIENT_SECRET`, `GOOGLE_REFRESH_TOKEN` | Google API credentials obtained from rclone. |
| `ALLOWED_BUCKETS` | Set the buckets allowed, separated by `,`. A directory with the bucket name will be created directly under Google Drive. |
| `PUBLIC_READ_BUCKETS` | *(Optional)* Buckets that allow unauthenticated GET/HEAD access without signature, separated by `,`. Write operations (PUT/POST/DELETE) still require authentication. Must be a subset of `ALLOWED_BUCKETS`. |
### 4. CORS Configuration