高级设置
更新时间:2023-05-16
设置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);