I am trying to upload a file to GCS by making a PUT request to a signed URL.
The CORS configuration of my bucket is
[
{
"origin": ["*"],
"responseHeader": ["Content-Type"],
"method": ["GET", "HEAD", "PUT", "POST", "DELETE"],
"maxAgeSeconds": 3600
}
]
This is the response of preflight

But chrome shows CORS error in console while making the actual PUT request.

Now the interesting part is that the file is actually getting uploaded to the bucket!
I am confused as to what exactly is happening here and why is chrome showing CORS error in the console when the file upload is working correctly.
I think your origin is misconfigured.
Try :