-
I think I've done everything right according to the documentation. I can confirm that all the pieces work fine if I'm using a local minio instance, but when trying to switch to a Backblaze bucket, I keep getting CORS missing issues in the browser when trying to view or upload photos. s3:
are_local_buckets: false
use_path_style_urls: false
b2-eu-cen:
key: xxx
secret: xxx
endpoint: s3.eu-central-003.backblazeb2.com
region: eu-central-003
bucket: xxx I've run the following command to enable CORS for the bucket: b2 bucket update --cors-rules "$(<./cors.json)" $B2_BUCKET_NAME allPrivate [
{
"corsRuleName": "allowUploadsAndDownloadsFromWebOrigin",
"allowedOrigins": [
"https://<MY_WEB_APP_DOMAIN>"
],
"allowedHeaders": [
"*"
],
"allowedOperations": [
"b2_download_file_by_id",
"b2_download_file_by_name",
"b2_upload_file",
"b2_upload_part"
],
"exposeHeaders": [
"etag"
],
"maxAgeSeconds": 3600
}
] yet: The upload URL itself seems to match the S3-compatible URL listed in a files info on Backblaze, so it does seem like CORS isn't working. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I can't answer in an authoritative manner, but at a glance it seems like the config in your case is missing the
Credits: User aflp and fwz on our community Discord. |
Beta Was this translation helpful? Give feedback.
-
@mnvr Thanks, indeed that was the issue, also I had to use |
Beta Was this translation helpful? Give feedback.
I can't answer in an authoritative manner, but at a glance it seems like the config in your case is missing the
s3_*
operations from the allowed operations list. I'll just copy paste an working B2 CORS config someone shared on our community Discord recently (again, I'm not vouching for its correctness, or if it is the most secure, just sharing in case it helps):