Add Backblaze CORS settings
parent
78d30146cd
commit
bd5bc1aa27
30
Backblaze-CORS-settings.md
Normal file
30
Backblaze-CORS-settings.md
Normal file
@ -0,0 +1,30 @@
|
||||
To enable client side file uploads on a B2 bucket, CORS rules must be set.
|
||||
|
||||
|
||||
|
||||
b2 bucket update --cors-rules "$(<~/cors-rules.json)" fp-dev
|
||||
|
||||
```json5
|
||||
// cors-rules.json
|
||||
[
|
||||
{
|
||||
"allowedHeaders": [
|
||||
"*"
|
||||
],
|
||||
"allowedOperations": [
|
||||
"s3_head",
|
||||
"s3_put",
|
||||
"s3_get"
|
||||
],
|
||||
"allowedOrigins": [
|
||||
"https://futureporn.net"
|
||||
],
|
||||
"corsRuleName": "downloadFromAnyOriginWithUpload",
|
||||
"exposeHeaders": [
|
||||
"etag"
|
||||
],
|
||||
"maxAgeSeconds": 3600
|
||||
}
|
||||
]
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user