应用安全加速解决方案、IPv6一体化解决方案、电商安全加速解决方案、金融安全加速解决方案、政企安全加速解决方案、应用安全解决方案、区块链安全加速解决方案、IPv6安全加速解决方案、点播分发、直播分发、移动加速、网页加速、下载分发、全站加速
查看拉取跳转后的文件
Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试
参数名称 | 类型 | 必填 | 描述 |
---|---|---|---|
domain-name | String | 是 | 域名名称或域名id,在请求的url后面 |
参数名称 | 类型 | 描述 |
---|---|---|
http status code | Integer | httpstatus=202; 表示成功调用新增域名接口,可使用header中的x-cnc-request-id查看当前新增域名的部署情况 |
x-cnc-request-id | String | 唯一标示的id,用于查询每次请求的任务 (适用全部接口) |
domain-name | String | 域名名称,在请求的url后面 |
domain-id | String | 域名id,在请求的url后面 |
origin-related-after-redirect | QueryAfterRedirectResponseOriginRelatedAfterRedirect | 拉取302后的文件设置,设置参数如下:
1、拉取跳转后的文件
2、不根据dns缓存都进行302跳转
3、支持最多跳转次数
4、是否多次跟随跳转
5、是否将回源HOST替换成IP
6、是否仅用locaiton的域名做DNS解析
7、清空拉取302后的文件内容,则只传入标签 |
after-redirect | String | 拉取跳转后的文件,可选值:301|302|301;302
301:301跳转
302:302跳转
301;302:301与302两种跳转
示例: |
ignore-dns-cache | String | 不根据dns缓存都进行302跳转,可选值:true(即不根据dns缓存全部进行302跳转)、false(根据dns缓存全部进行302跳转)
示例: |
max-times | Integer | 支持最多跳转次数,数值为正整数
示例: |
control-follow-jump | String | 该配置项用于控制是否多次跟随跳转,可选值:true(只要原频道允许302跳转则能持续跳转)、false(不进行多次跟随跳转)
示例: |
replace-source-mode | String | 该配置项用于将回源HOST替换成IP,可选值:true(当302跳转响应的host为ip时,设置回源host头为该ip)、false(设置回源host头为原始域名)
示例: |
location-dns-resolution | String |
错误代码(code) | 描述(message) | HTTP状态码 | 语义 |
---|---|---|---|
NoSuchDomain | The specified domain does not exist. | 404 | 域名不存在 |
CustomerNoOwnDomain | customer not own domain name[{0}] | 400 | 域名不属于当前客户 |
#!/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/afterredirect/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: Thu, 16 May 2019 02:03:47 GMT Content-Type: application/json;charset=utf-8 Content-Length: 400 Connection: keep-alive App-Name: service_confApi x-cnc-request-id: d5911ae3-6025-40ed { "domain-id":"70514", "domain-name":"www.bblinly.com", "origin-related-after-redirect":{ "after-redirect":"302", "ignore-dns-cache":"true", "max-times":"5", "control-follow-jump":"true", "replace-source-mode":"true", "location-dns-resolution":"true" } }