I've done the CORS set to bucket of google cloud storage, there is no Access-Control-Allow-Origin header
If my settings are wrong , I want you to tell me the right way .
My Settings
$ cat cors-json-file.json
[
{
"origin": [
"*"
],
"responseHeader": ["Origin", "Accept", "X-Requested-With", "Authorization", "Content-Type", "Content-Length", "Accept-Encoding", "X-CSRF-Token"],
"method": [
"GET",
"OPTIONS"
],
"maxAgeSeconds": 1
}
]
$ gsutil cors set cors-json-file.json gs://stone-swallow
$ gsutil cors get gs://stone-swallow
[{"origin": ["*"], "responseHeader": ["Origin", "Accept", "X-Requested-With", "Authorization", "Content-Type", "Content-Length", "Accept-Encoding", "X-CSRF-Token"], "method": ["GET", "OPTIONS"], "maxAgeSeconds": 1}]
try browser error message
var invocation = new XMLHttpRequest();
var url = 'http://storage.googleapis.com/stone-swallow/arcanine.png';
function callOtherDomain() {
if(invocation) {
invocation.open('GET', url, true);
invocation.send();
}
}
callOtherDomain();
XMLHttpRequest cannot load http://storage.googleapis.com/stone-swallow/arcanine.png. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.