所有文档

          内容分发网络 CDN

          高级设置

          设置HttpHeader

          $httpHeader = array(
              'httpHeader' => array(
                  array(
                      "type" => "origin",
                      "header" => "x-auth-cn",
                      "value" => "xxxxxxxxx",
                      "action" => "add"
                  )
              )
          );
          
          $client = new CdnClient($g_CDN_TEST_CONFIG);
          $domain = "test-sdk.sys-qa.com";
          $resp = $client->setDomainHttpHeader($domain, $httpHeader);
          print_r($resp);

          查询HttpHeader

          $client = new CdnClient($g_CDN_TEST_CONFIG);
          $domain = "test-sdk.sys-qa.com";
          $resp = $client->getDomainHttpHeader($domain);
          print_r($resp);

          设置SEO开关属性

          $seoSwitch = array(
              'seoSwitch' => array(
                  "diretlyOrigin" => "ON",
                  "pushRecord" => "OFF"
              )
          );
          
          $client = new CdnClient($g_CDN_TEST_CONFIG);
          $domain = "test-sdk.sys-qa.com";
          $resp = $client->setDomainSeoSwitch($domain, $seoSwitch);
          print_r($resp);

          查询SEO开关属性

          $client = new CdnClient($g_CDN_TEST_CONFIG);
          $domain = "test-sdk.sys-qa.com";
          $resp = $client->getDomainSeoSwitch($domain);
          print_r($resp);

          设置页面优化

          $fileTrim = array(
              'fileTrim' => true
          );
          
          $client = new CdnClient($g_CDN_TEST_CONFIG);
          $domain = "test-sdk.sys-qa.com";
          $resp = $client->setDomainFileTrim($domain, $fileTrim);
          print_r($resp);

          查询页面优化

          $client = new CdnClient($g_CDN_TEST_CONFIG);
          $domain = "test-sdk.sys-qa.com";
          $resp = $client->getDomainFileTrim($domain);
          print_r($resp);

          设置视频拖拽

          $mediaDrag = array(
              'mediaDragConf' => array(
                  'mp4' => array(
                      'fileSuffix' => array('mp4'),
                      'startArgName' => 'startIndex',
                      'dragMode' => 'second',
                      'endArgName' => 'end'
                  )
              )
          );
          
          $client = new CdnClient($g_CDN_TEST_CONFIG);
          $domain = "test-sdk.sys-qa.com";
          $resp = $client->setDomainMediaDrag($domain, $mediaDrag);
          print_r($resp);

          查询视频拖拽

          $client = new CdnClient($g_CDN_TEST_CONFIG);
          $domain = "test-sdk.sys-qa.com";
          $resp = $client->getDomainMediaDrag($domain);
          print_r($resp);

          设置页面压缩

          $compress = array(
              'compress' => array(
                  "allow" => true,
                  "type" => "br"
              )
          );
          
          $client = new CdnClient($g_CDN_TEST_CONFIG);
          $domain = "test-sdk.sys-qa.com";
          $resp = $client->setDomainCompress($domain, $compress);
          print_r($resp);

          查询页面压缩

          $client = new CdnClient($g_CDN_TEST_CONFIG);
          $domain = "test-sdk.sys-qa.com";
          $resp = $client->getDomainCompress($domain);
          print_r($resp);
          上一篇
          访问控制
          下一篇
          https设置