内容分发网络CDN

    域名配置并行更新

    设置域名配置并行更新

    支持的配置有:
    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)
    上一篇
    高级设置
    下一篇
    缓存管理