尝试在Google云端存储上列出存储桶内容时无法使CORS正常工作(未找到404)

use*_*398 5 google-api

我按照CORS的所有说明和"故障排除"指南,但我感觉它只是不工作..我花了最近2天只是试图列出一个桶内容而不管我如何为我的桶配置我的CORS它失败方式相同.

我正在使用的: 一个angularJS客户端应用程序使用我本地计算机上的JSON API(即localhost)直接与Google云端存储进行对话

遵循所有建议:

https://developers.google.com/storage/docs/cross-origin

我的桶: gs:// okrp-dev

THE ERROR(chrome最新浏览器) XMLHttpRequest无法加载https://storage.googleapis.com/storage/v1beta2/b/okrp-dev/o.请求的资源上不存在"Access-Control-Allow-Origin"标头.http://localhost因此,不允许访问" 来源" .

我的CORS文件现在(虽然我已尝试过其他所有排列): bash-3.2 $ gsutil cors get gs:// okrp-dev

<?xml version="1.0" ?>
<CorsConfig>
    <Cors>
        <Origins>
            <Origin>*</Origin>
            <Origin>    

    http://localhost</Origin>
        </Origins>
        <Methods>
            <Method>GET</Method>
            <Method>POST</Method>
            <Method>HEAD</Method>
        </Methods>
        <ResponseHeaders>
            <ResponseHeader>*</ResponseHeader>
        </ResponseHeaders>
        <MaxAgeSec>86400</MaxAgeSec>
    </Cors>
</CorsConfig>
Run Code Online (Sandbox Code Playgroud)

来自Chrome开发工具网络标签的跟踪:

Remote Address:74.125.193.132:443

Request URL:https://storage.googleapis.com/storage/v1beta2/b/okrp-dev/o

Request Method:OPTIONS
Status Code:200 OK
Request Headers
:host:
storage.googleapis.com

:method:OPTIONS
:path: /storage/v1beta2/b/okrp-dev/o

:scheme:https
:version:
HTTP/1.1

accept:*/*
accept-encoding:
gzip,deflate,sdch

accept-language:en-US,en;q=0.8,tr;q=0.6

access-control-request-headers:access-control-allow-origin, accept, authentication

access-control-request-method:GET
cache-control:
no-cache

origin: 

    http://localhost    
pragma:
no-cache

referer:http://localhost/okrp/app/


Response Headersview source

alternate-protocol:443:quic
cache-control:
private, max-age=0

content-length:0
content-type:
text/html; charset=UTF-8

server:HTTP Upload Server Built on Mar 5 2014 15:51:04 (1394063464)

status:200 OK
version:
HTTP/1.1
Run Code Online (Sandbox Code Playgroud)

注意我的身份验证工作正常.我不再获得401.只有404. 注意我当然完全打开了桶和对象的所有权限,这根本没有帮助.

我怎么能解决这个问题?