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>