-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CORS on b2.authorize() #136
Comments
The fix to this is to set a cors rule using the cli:
you need to authorise in the cli before you can run this command |
i was already done, thing is it wasn't working as a helper, I created a separated endpoint and it started working. something strange, that it blocks if it is been called from client side and not from server-side with next. |
Would you know how to fix cors error for downloading_file_by_name? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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);
}
`
The text was updated successfully, but these errors were encountered: