Meteor和google云存储跨源

Meteor和google云存储跨源,meteor,cors,google-cloud-storage,gcloud,Meteor,Cors,Google Cloud Storage,Gcloud,您好,我已经尝试了几天,以解决我的跨来源问题,但没有任何成功 我正在使用最新版本的谷歌云存储API,并通过gustils设置我的cors gsutils cors sets cors.json gs://mybucket 这是我的cors.json [ { "origin": ["*"], "method": ["GET", "HEAD", "DELETE", "PUT", "OPTIONS"], "maxAgeSeconds": 1800, "R

您好,我已经尝试了几天,以解决我的跨来源问题,但没有任何成功

我正在使用最新版本的谷歌云存储API,并通过gustils设置我的cors

gsutils cors sets cors.json gs://mybucket
这是我的cors.json

[ 
  { 
    "origin": ["*"], 
    "method": ["GET", "HEAD", "DELETE", "PUT", "OPTIONS"], 
    "maxAgeSeconds": 1800, 
    "ResponseHeader": ["*"] 
  } 
]
但由于某种原因,当我试图通过我的网络表单上传我的文件,然后使用xhr时,我仍然有一个问题

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://storage.googleapis.com//buckettest/Kung-Fu-panda-21.jpg?GoogleAccessId=xxxxxxxxxh@developer.gserviceaccount.com&https://storage.googleapis.com//ilovemeteor/Kung-Fu-panda-21.jpg&Expires=86400&Signature=xxxxxxxxxxxxxxxxxxxx. This can be fixed by moving the resource to the same domain or enabling CORS.

我使用的是带签名的url方法PUT

好的,我在返回文档后设法解决了这个问题,但还是设法找到了一直在我眼前的错误。我想我需要一双新眼睛


当我创建URL时,我在我的URL中添加了一个额外的/

我成功地解决了这个问题,抱歉,我犯了一个愚蠢的错误。