Baidu AI Cloud
中国站

百度智能云

CDN

Update the Domain Name Configuration in Parallel

Set Parallel Update of Domain Name Configuration

The configurations supported include:
cacheTTL
cacheFullUrl
ipACL
refererACL
https
requestAuth
followProtocol
rangeSwitch
cors
dsa
seoSwitch
mediaDragConf
origin
httpHeader
clientIp
errorPage
fileTrim
mobileAccess
accessLimit
compress
trafficLimit

def test_set_domain_multi_configs(c): 
    """
    test_set_domain_multi_configs
    """
    multi_configs = { 
            "origin": [ 
                {'peer': '1.2.3.4:80', 'host': 'www.originhost.com'}, 
                {'peer': '1.2.3.5', 'host': 'www.originhost.com'}, 
            ], 
            "cacheFullUrl": { 
                "cacheFullUrl": False, 
                "cacheUrlArgs": [ 
                    "a", 
                    "b" 
                ] 
            }, 
            "ipACL": { 
                "blackList": [ 
                    "1.1.1.2",
                    "1.1.1.3"
                ] 
            }, 
            "errorPage": [ 
                { 
                    "code":404, 
                    "redirectCode":302, 
                    "url":"/customer_404.html" 
                } 
            ], 
            "compress": { 
                "allow" : True, 
                "type" : "br" 
            }, 
            "errorPage": [ 
                { 
                    "code":404, 
                    "redirectCode":302, 
                    "url":"/customer_404.html" 
                } 
            ] 
        } 
    response = c.set_domain_multi_configs('test-sdk.sys-qa.com', multi_configs) 
    print(response) 
Previous
Advanced Setting
Next
Access Control