16 Replies
@sdnts This is what my CORS policy looks like now and I still dont have any luck:
[
{
"AllowedOrigins": [
""
],
"AllowedMethods": [
"DELETE",
"HEAD",
"GET",
"PUT",
"POST"
],
"AllowedHeaders": [
""
]
}
]
I think you misunderstood. I didn’t mean remove the origin entirely, I meant remove the last ‘/‘ from your origins. Without any AllowedOrigins, CORS will definitely not work
Sorry dont know why it wasnt showing the "" but some sort of error on copy/paste. But I did try removing teh trailing "/" and that did not do anything. So I decided to go the nuclear approach and just putting wildcards everywhere. That isn't working either
[
{
"AllowedOrigins": [
""
],
"AllowedMethods": [
"DELETE",
"HEAD",
"GET",
"PUT",
"POST"
],
"AllowedHeaders": [
"*"
]
}
]
Interesting. When I paste it, it seems to remove the wildcard. Here is a picture of what it looks like

Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Can you show me your outgoing request? The one that is throwing the CORS error?
Either the ‘fetch’ call you make from the browser or a screenshot of the DevTools Network tab will do.
If there’s a preflight request, can you show me that as well?
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
How about the Network tab of the DevTools? Try and expand the failing request so I can see the outgoing headers
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Wait so CORS rules are set on a specific bucket, they won’t apply to your ListBuckets call
Try and send out a bucket-specific request
That’s why listing and creating objects works for you
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
You can’t set an account-wide CORS rule at the moment
Your Node API call works because Node doesn’t respect CORS
CORS is a browser-only thing
Is there some reason you want to be able to list all buckets in your account from a browser?
I am doing the following and getting a CORS error:
fetch(presignedURL, {
method: "post",
body: formData
}).catch(console.error)
trying to upload a file
Interesting.. changing the "post" to "put" worked.
POSTs for PutObject aren’t supported currently FWIW, so that is probably not CORS’ fault
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Yeah, PutObject would perform the same regardless of where you cal it from