brunub
Explore posts from serversCDCloudflare Developers
•Created by brunub on 6/11/2023 in #general-help
r2 CORS problem
Hello guys, I've been trying to
PUT
a data to my r2 bucket from the application's front end using a presigned URL but it have been blocked by CORS
Error: Access to fetch at 'https://video.xxxxxxxxxx.r2.cloudflarestorage.com/xxxxxxx from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
In the bucket's CORS config é have the method PUT
and the URL http://localhost:3000
set
My request is simple as
the signed URl is generated like this
the s3 instance is pretty simple as well:
Any adea how to get over the CORS problem in this context?31 replies