b2 setup
This commit is contained in:
@@ -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>
|
||||
```
|
||||
@@ -0,0 +1,3 @@
|
||||
# Backblaze Snippets and Musings
|
||||
|
||||
#### [Development Bucket](./development-bucket.md)
|
||||
Reference in New Issue
Block a user