Skip to main content
Backblaze B2 uses the S3 API with AWS Signature V4 against https://s3.<region>.backblazeb2.com. MIRAGE derives this endpoint from your region automatically. Credentials (B2 application key, the keyID is the access key and the applicationKey is the secret) are created the same way in both runtimes, see Backblaze B2 Credentials.

Node (server-side)

Browser (presigned URLs)

The browser BackblazeResource is secret-free, your backend signs each operation using your B2 application key and returns a URL. B2 accepts AWS Signature V4, so @aws-sdk/s3-request-presigner works, pointed at the B2 endpoint.

1. Server: sign URLs with the B2 endpoint

2. Browser: wire it up

region on the browser config is only used for display/logging; the actual endpoint is baked into the presigned URLs your backend returns.

3. CORS

B2 manages CORS through its native API, not the S3 PutBucketCors call. Set CORS rules in the Backblaze web console (Bucket Settings -> CORS Rules) or with the b2 CLI:
See the Backblaze resource docs for the equivalent Python wiring.