b2 setup
Build, Test & Publish / Build (push) Successful in 1m34s
Build, Test & Publish / Build and Publish Container Image (push) Successful in 3m1s
Build, Test & Publish / Deploy to Infrastructure (push) Successful in 29s

This commit is contained in:
2026-06-18 17:45:15 +10:00
parent b148b03b2e
commit db11e2e359
5 changed files with 50 additions and 1 deletions
+33
View File
@@ -0,0 +1,33 @@
# Development Bucket
To create a bucket for development that can be used by all origins we need to enable CORS for the bucket. First create the bucket and some access keys then download the `b2-windows.exe` tool from the website.
First login using the keys:
```powershell
b2 authorize-account <accountId> <applicationKey>
```
Next lets set the cors rules for the bucket:
```powershell
$rules =
@'
[
{
"corsRuleName": "allowall-s3",
"allowedOrigins": ["*"],
"allowedHeaders": ["*"],
"allowedOperations": [
"s3_get",
"s3_put",
"s3_head",
"s3_delete"
],
"exposeHeaders": ["ETag", "x-amz-server-side-encryption", "x-amz-request-id"],
"maxAgeSeconds": 3600
}
]
'@
b2 update-bucket --cors-rules $rules <bucketName>
```
+3
View File
@@ -0,0 +1,3 @@
# Backblaze Snippets and Musings
#### [Development Bucket](./development-bucket.md)
+4
View File
@@ -22,6 +22,10 @@ hero:
text: Azure
link: /azure/
- theme: alt
text: Backblaze
link: /b2/
- theme: alt
text: CSS
link: /css/