百度智能云

All Product Document

          CDN

          Query Cors Cross-domain

          This interface is used to query the Cors cross-domain settings of the specified accelerated domain name.

          Method Path Description
          GET /v2/domain/{domain}/config?cors Query the cors cross-domain settings of the domain name

          domain: Need to query the accelerated domain name of CDN.

          Response body)

          Parameter Type Description
          cors cors Corresponding cross-domain setting

          config

          Parameter Optional Type Description
          allow Required String Whether to enable cross-domain; “on” means cross-domain and “off” means disable cross-domain
          originList Optional Array The supported domain name list when activating cross-domain

          Response example

          HTTP/1.1 200 OK 
          Server: nginx/1.14.0 
          Date: Fri, 21 Sep 2018 03:46:35 GMT 
          Content-Type: application/json; charset=utf-8 
          Transfer-Encoding: chunked 
          Connection: keep-alive 
          X-Powered-By: PHP/5.6.36 
          x-bce-request-id: fb39f52e-203d-5558-6543-15bbaaf6b4a7
          
          {"cors":{"allow":"on","originList":["http://www.baidu.com","http://*.bce.com"]}} 
          Previous
          Set Cors Cross-domain
          Next
          Set the Domain Name Speed Limit