Skip to content

CORS on b2.authorize() #136

@Casal0x

Description

@Casal0x

Hi all I'm trying to set up Backblaze for a nextjs app, but I'm getting cors error, in the first instance I thought that it was the bucket and I set the custom cors rules but it was not because I'm getting this error on b2.authorize().
I'm using it from localhost:3000

Has anyone experienced this issue? Do I have to use the master key?

`
async function uploadToB2(file: Blob) {
const b2 = new B2({
applicationKeyId: process.env.NEXT_PUBLIC_APPLICATION_KEY_ID as string,
applicationKey: process.env.NEXT_PUBLIC_APPLICATION_KEY as string,
});
const auth = await b2.authorize();

console.log(auth);
}
`

image image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions