/security/cors/

获取跨域请求头设置

请求地址

/security/cors/

HTTP请求方法

GET

是否需要登陆授权

是,关于登录授权,参见授权机制

请求参数

必选 数据类型及范围 说明
bucket_name true string 空间名

返回结果

当设置存在时:

{
  "result": true,
  "data": {
    "bucket_name": "bucket",
    "enable": true,
    "options":  [
        {
            "allow_domains": ["*.foo.com","*.bar.com"],
            "allow_methods": ["GET","POST"],
            "allow_headers":["X-Foo","X-Bar"],
            "expose_headers":["X-Foo","X-Bar"],
            "max_age":86400
         },
         {
            "allow_domains": ["*.foo.com","*.bar.com"],
            "allow_methods": ["GET","POST"],
            "allow_headers":["X-Foo","X-Bar"],
            "expose_headers":["X-Foo","X-Bar"],
            "max_age":86400
         },
     ]
  }
}

否则返回空:

{
  "result": true,
  "data": {
    "bucket_name": "bucket",
    "enable": true,
    "options":  [
     ]
  }
}
Last edited by xiaohui.chen, 2016-02-19 15:54:27