所有文档

          内容分发网络 CDN

          高级设置

          设置HttpHeader

          def test_set_domain_http_header(c):
              """
              test set domain http header
              """
              http_header = [
                  {"type": "origin", "header": "x-auth-cn", "value":"xxxxxxxxx", "action": "add"},
                  {"type": "response", "header": "content-type", "value":"application/octet-stream", "action": "add"}
              ]
              domain = 'test-sdk.sys-qa.com'
              response = c.set_domain_http_header(domain, http_header);
              print(response)

          查询HttpHeader

          def test_get_domain_http_header(c):
              """
              test get domain http header
              """
              response = c.get_domain_http_header('test-sdk.sys-qa.com')
              print(response)

          设置页面优化

          def test_set_domain_file_trim(c):
              """
              test set domain file trim
              """
              file_trim = True
              domain = 'test-sdk.sys-qa.com'
              response = c.set_domain_file_trim(domain, file_trim);
              print(response)

          查询页面优化

          def test_get_domain_file_trim(c):
              """
              test get domain file trim
              """
              response = c.get_domain_file_trim('test-sdk.sys-qa.com')
              print(response)

          设置视频拖拽

          def test_set_domain_media_drag(c):
              """
              test set domain media drag
              """
              media_drag = {
                  "mp4":{
                      "fileSuffix":[
                          "mp4",
                          "m4a"
                      ],
                      "startArgName":"startIndex",
                      "dragMode":"second"
                  },
                  "flv":{
                      "dragMode":"byteAV"
                  }
              }
              domain = 'test-sdk.sys-qa.com'
              response = c.set_domain_media_drag(domain, media_drag);
              print(response)

          查询视频拖拽

          def test_get_domain_media_drag(c):
              """
              test get domain media drag
              """
              response = c.get_domain_media_drag('test-sdk.sys-qa.com')
              print(response)

          设置页面压缩

          def test_set_domain_compress(c):
              """
              test set domain compress
              """
              compress = {"allow": True, "type": "gzip"}
              domain = 'test-sdk.sys-qa.com'
              response = c.set_domain_compress(domain, compress);
              print(response)

          查询页面压缩

          def test_get_domain_compress(c):
              """
              test get domain compress
              """
              response = c.get_domain_compress('test-sdk.sys-qa.com')
              print(response)
          上一篇
          HTTPS配置
          下一篇
          域名配置并行更新