百度智能云

All Product Document

          CDN

          Set the Access ua Control

          Interface

          Set the ua access control interface of the domain name.

          Method Path Description
          PUT /v2/domain/{domain}/config?uaAcl Set ua access configuration

          domain:Modify the configured CDN acceleration domain name.

          Request body

          Parameter Optional Type Description
          uaAcl Required uaAcl Access ua configuration rules

          The uaAcl types are as follows:

          Parameter Optional Type Description
          blackList Optional list ua blacklist, the length of a single ua is 1-200 characters.
          whiteList Optional list ua whitelist, the length of a single ua is 1-200 characters.

          blackList and whiteList cannot exist at the same time. Can’t be none.

          Response code (Http Status Code)

          HTTP Status Code Description
          200 Success
          400 Update failures, parameter errors, etc.

          Request example 1 - use the whitelist

          PUT /v2/domain/geloutinyyu11.yy.com/config?uaAcl 
          
          { 
              "uaAcl": { 
                  "whiteList": [ 
                      "MQQBrowser/5.3/Mozilla/5.0",
                      "Mozilla/5.0 (Linux; Android 7.0" 
                  ] 
              } 
          } 

          Request example 2 - use the blacklist

          PUT /v2/domain/geloutinyyu11.yy.com/config?uaAcl 
          
          { 
              "uaAcl": { 
                  "blackList": [ 
                      "MQQBrowser/5.3/Mozilla/5.0",
                      "Mozilla/5.0 (Linux; Android 7.0" 
                  ] 
              } 
          } 

          Request example 3 - delete uaAcl

          PUT /v2/domain/geloutinyyu11.yy.com/config?uaAcl 
          
          { 
              "uaAcl": { 
                  "whiteList": [] 
              } 
          } 

          Response example

          HTTP/1.1 200 OK 
          Content-Type: application/json; charset=utf-8 
          Transfer-Encoding: chunked 
          
          {"status":"RUNNING"} 
          Previous
          Query the Access Referer Control
          Next
          Query the Access ua Control