b2 setup
This commit is contained in:
@@ -67,6 +67,14 @@ export default defineConfig({
|
|||||||
{ text: 'Identify Untagged Resources', link: '/azure/identify-untagged-resources' },
|
{ text: 'Identify Untagged Resources', link: '/azure/identify-untagged-resources' },
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
text: 'Backblaze',
|
||||||
|
link: '/b2/',
|
||||||
|
collapsed: true,
|
||||||
|
items: [
|
||||||
|
{ text: 'Development Bucket', link: '/b2/development-bucket' },
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
text: 'CSS',
|
text: 'CSS',
|
||||||
link: '/css/',
|
link: '/css/',
|
||||||
|
|||||||
@@ -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)
|
||||||
@@ -22,6 +22,10 @@ hero:
|
|||||||
text: Azure
|
text: Azure
|
||||||
link: /azure/
|
link: /azure/
|
||||||
|
|
||||||
|
- theme: alt
|
||||||
|
text: Backblaze
|
||||||
|
link: /b2/
|
||||||
|
|
||||||
- theme: alt
|
- theme: alt
|
||||||
text: CSS
|
text: CSS
|
||||||
link: /css/
|
link: /css/
|
||||||
|
|||||||
+2
-1
@@ -11,5 +11,6 @@
|
|||||||
"dev": "vitepress dev --host 0.0.0.0",
|
"dev": "vitepress dev --host 0.0.0.0",
|
||||||
"build": "vitepress build",
|
"build": "vitepress build",
|
||||||
"preview": "vitepress preview"
|
"preview": "vitepress preview"
|
||||||
}
|
},
|
||||||
|
"packageManager": "pnpm@10.32.1+sha512.a706938f0e89ac1456b6563eab4edf1d1faf3368d1191fc5c59790e96dc918e4456ab2e67d613de1043d2e8c81f87303e6b40d4ffeca9df15ef1ad567348f2be"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user