简体   繁体   English

Google Cloud拥有多个帐户?

[英]Google cloud cors multiple accounts?

I am wondering how do I setup multiple Google accounts using cors. 我想知道如何使用cors设置多个Google帐户。 From below image(reference(2) url), it's clear stated that we can do multiple accounts setup on cors. 从下面的image(reference(2)url)可以清楚地表明,我们可以在cors上进行多个帐户设置。

在此处输入图片说明

Can someone assist me? 有人可以帮我吗? FYI, I followed this approach https://cloud.google.com/storage/docs/gsutil/commands/cors 仅供参考,我遵循了这种方法https://cloud.google.com/storage/docs/gsutil/commands/cors

Ref: 1. https://cloud.google.com/storage/docs/cross-origin 参考:1. https://cloud.google.com/storage/docs/cross-origin

  1. https://cloud.google.com/storage/docs/xml-api/put-bucket-cors https://cloud.google.com/storage/docs/xml-api/put-bucket-cors

I think you're confusing some things here. 我认为您在这里有些困惑。 Google accounts have nothing to with CORS. Google帐户与CORS无关。

As for allowing multiple origins for a bucket, using the gsutil example you provided as a base, the JSON used contains an origin key/value pair. 至于允许存储桶有多个来源,请以您提供的gsutil示例为基础,使用的JSON包含一个来源键/值对。 The value is an array and can contain multiple comma-separated values: 该值是一个数组,可以包含多个逗号分隔的值:

[
    {
        "origin": [
            "http://origin1.appspot.com",
            "http://origin2.appspot.com"
        ],
        "responseHeader": [
            "Content-Type"
        ],
        "method": [
            "GET"
        ],
        "maxAgeSeconds": 3600
    }
]

Another option is to supply multiple objects, if you for example want to use GET methods for one origin and GET & DELETE for another origin: 另一个选择是提供多个对象,例如,如果您想对一个来源使用GET方法,而对另一个来源使用GET&DELETE:

[
    {
        "origin": [
            "http://origin1.appspot.com"
        ],
        "responseHeader": [
            "Content-Type"
        ],
        "method": [
            "GET"
        ],
        "maxAgeSeconds": 3600
    },
    {
        "origin": [
            "http://origin2.appspot.com"
        ],
        "responseHeader": [
            "Content-Type"
        ],
        "method": [
            "GET",
            "DELETE"
        ],
        "maxAgeSeconds": 3600
    }
]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM