直播分发、移动加速、网页加速、下载分发、全站加速、应用安全加速解决方案、IPv6一体化解决方案、电商安全加速解决方案、金融安全加速解决方案、政企安全加速解决方案、应用安全解决方案、区块链安全加速解决方案、IPv6安全加速解决方案、点播分发
通过接口自助查询响应头内容缓存规则。
Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试
参数名称 | 类型 | 必填 | 描述 |
---|---|---|---|
domain-name | String | 是 | 需要查询配置的域名或域名id |
参数名称 | 类型 | 描述 |
---|---|---|
domain-name | String | 需要查询配置的域名或域名id |
domain-id | String | 需要查询配置的域名或域名id |
cache-by-respheaders | List | |
data-id | Long | 添加grid类型标识,表示客户多组配置时,具体某组配置 |
response-header | String | 响应头头部名称 需要缓存的响应头名称。如Cache-Control |
is-respheader | String | 是否允许响应头内容缓存文件,可选值为true或false,true表示允许响应头内容缓存文件;false表示不允许响应头内容缓存文件 |
path-pattern | String | url匹配模式,支持正则,如果是全部匹配,入参可以配置为:.* |
except-path-pattern | String | 例外的url匹配模式,某些URL除外:如abc.jpg,不做内容重定向 |
ignore-letter-case | String | 忽略大小写,可选值为true或false,true表示忽略大小写;false表示不忽略大小写; 新增配置项时,不传默认为 true |
priority | String | 优先级 |
response-value | String | 头部值。 |
#!/bin/bash username="example_username" apiKey="example_apiKey" date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"` password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64` curl -i --url "https://open.chinanetcenter.com/api/config/cachebyrespheader/a.example.com" \ -X "GET" \ -u "$username:$password" \ -H "Date: $date" \ -H "Accept: application/json" \ -H "Content-Type:application/json"
HTTP/1.1 200 OK Server: openresty/1.11.2.2 Date: Fri, 24 May 2019 08:49:31 GMT Content-Type: application/json;charset=utf-8 Content-Length: 454 Connection: keep-alive App-Name: service_confApi x-cnc-request-id: 45ed9955-fb90-48d5 { "domain-id": "86773", "domain-name": "a.example.com", "cache-by-respheaders": [ { "data-id": 1722838, "response-header": "Location", "response-value": ".", "is-respheader": "false", "path-pattern": null, "except-path-pattern": null, "ignore-letter-case": "true", "priority": "10" }, { "data-id": 1722372, "response-header": "Server", "response-value": ".", "is-respheader": "true", "path-pattern": null, "except-path-pattern": ".*.jpg$", "ignore-letter-case": "true", "priority": "10" } ] }