跳转至

查询域名详细配置

1. 接口描述

接口请求路径:POST /prod-api/acdn/tcdn/domainRest/describeDomainsConfig

describeDomainsConfig 用于分页查询当前账号下国内 TCDN 加速域名的详细配置,支持按域名、HTTPS 状态、资源 ID 筛选。账号需具备 tcdn:DescribeAllDomains 权限。

Token 获取方式见 密钥鉴权

注意:服务端会按本账号 projectId 过滤。命中后将本地 CNAME 写回 cname;本地无 CNAME 后缀时 cname 为空字符串。filters.labelhttpsvalue 首个元素为 on 时,服务端会同时匹配 processingon

2. 输入参数

以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数

参数名称 必选 类型 描述
pageNum Integer 当前页。示例值:1
pageSize Integer 每页条数。示例值:1
filters [SearchFilter] 搜索条件列表

3. 输出参数

参数名称 类型 描述
code Integer 状态码。示例值:200
msg String 提示信息。示例值:success
total Integer 域名总条数。示例值:1
rows [DetailDomain] 当前页域名详细配置

4. 示例

示例1 按域名查询详细配置

输入示例

{
  "pageNum": 1,
  "pageSize": 1,
  "filters": [
    {
      "label": "domain",
      "value": ["www.test.com"]
    }
  ]
}

代码调用

请将 {登录域名}token 替换为实际值。

curl -X POST 'https://{登录域名}/prod-api/acdn/tcdn/domainRest/describeDomainsConfig' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.xxxxxx' \
  -H 'Content-Type: application/json' \
  -d '{
  "pageNum": 1,
  "pageSize": 1,
  "filters": [
    {
      "label": "domain",
      "value": ["www.test.com"]
    }
  ]
}'
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;

public class DescribeDomainsConfigTest {

    public static void main(String[] args) throws Exception {
        String url = "https://{登录域名}/prod-api/acdn/tcdn/domainRest/describeDomainsConfig";
        String token = "eyJhbGciOiJIUzUxMiJ9.xxxxxx";

        String requestBody = "{"
                + "\"pageNum\":1,"
                + "\"pageSize\":1,"
                + "\"filters\":[{\"label\":\"domain\",\"value\":[\"www.test.com\"]}]"
                + "}";

        try (CloseableHttpClient httpClient = HttpClients.createDefault()) {
            HttpPost httpPost = new HttpPost(url);
            httpPost.setHeader("Authorization", "Bearer " + token);
            httpPost.setEntity(new StringEntity(requestBody, ContentType.APPLICATION_JSON));

            try (CloseableHttpResponse response = httpClient.execute(httpPost)) {
                int statusCode = response.getStatusLine().getStatusCode();
                String body = EntityUtils.toString(response.getEntity(), "UTF-8");
                System.out.println("Status Code: " + statusCode);
                System.out.println("Body: " + body);
            }
        }
    }
}
package main

import (
    "bytes"
    "fmt"
    "io"
    "net/http"
)

func main() {
    url := "https://{登录域名}/prod-api/acdn/tcdn/domainRest/describeDomainsConfig"
    token := "eyJhbGciOiJIUzUxMiJ9.xxxxxx"

    requestBody := []byte(`{
  "pageNum": 1,
  "pageSize": 1,
  "filters": [
    {
      "label": "domain",
      "value": ["www.test.com"]
    }
  ]
}`)

    req, err := http.NewRequest(http.MethodPost, url, bytes.NewReader(requestBody))
    if err != nil {
        panic(err)
    }
    req.Header.Set("Authorization", "Bearer "+token)
    req.Header.Set("Content-Type", "application/json")

    resp, err := http.DefaultClient.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    body, err := io.ReadAll(resp.Body)
    if err != nil {
        panic(err)
    }
    fmt.Println("Status Code:", resp.StatusCode)
    fmt.Println("Body:", string(body))
}

输出示例

{
  "total": 1,
  "rows":[
    {
        "header": {},
        "skipSign": false,
        "tag": null,
        "cache": {
            "header": {},
            "skipSign": false,
            "simpleCache": null,
            "advancedCache": null,
            "ruleCache": [
                {
                    "header": {},
                    "skipSign": false,
                    "ruleType": "all",
                    "rulePaths": [
                        "*"
                    ],
                    "cacheConfig": {
                        "header": {},
                        "skipSign": false,
                        "cache": {
                            "header": {},
                            "skipSign": false,
                            "switch": "on",
                            "ignoreSetCookie": "off",
                            "cacheTime": 2592000,
                            "compareMaxAge": "off",
                            "ignoreCacheControl": "off",
                            "stream": false
                        },
                        "noCache": {
                            "header": {},
                            "skipSign": false,
                            "switch": "off",
                            "revalidate": "off",
                            "stream": false
                        },
                        "followOrigin": {
                            "header": {},
                            "skipSign": false,
                            "switch": "off",
                            "heuristicCache": {
                                "header": {},
                                "skipSign": false,
                                "switch": "off",
                                "cacheConfig": {
                                    "header": {},
                                    "skipSign": false,
                                    "heuristicCacheTimeSwitch": "off",
                                    "heuristicCacheTime": 0,
                                    "stream": false
                                },
                                "stream": false
                            },
                            "stream": false
                        },
                        "stream": false
                    },
                    "stream": false
                },
                {
                    "header": {},
                    "skipSign": false,
                    "ruleType": "file",
                    "rulePaths": [
                        "php",
                        "jsp",
                        "asp",
                        "aspx"
                    ],
                    "cacheConfig": {
                        "header": {},
                        "skipSign": false,
                        "cache": {
                            "header": {},
                            "skipSign": false,
                            "switch": "off",
                            "ignoreSetCookie": "off",
                            "cacheTime": 2592000,
                            "compareMaxAge": "off",
                            "ignoreCacheControl": "off",
                            "stream": false
                        },
                        "noCache": {
                            "header": {},
                            "skipSign": false,
                            "switch": "on",
                            "revalidate": "off",
                            "stream": false
                        },
                        "followOrigin": {
                            "header": {},
                            "skipSign": false,
                            "switch": "off",
                            "heuristicCache": {
                                "header": {},
                                "skipSign": false,
                                "switch": "off",
                                "cacheConfig": {
                                    "header": {},
                                    "skipSign": false,
                                    "heuristicCacheTimeSwitch": "off",
                                    "heuristicCacheTime": 0,
                                    "stream": false
                                },
                                "stream": false
                            },
                            "stream": false
                        },
                        "stream": false
                    },
                    "stream": false
                }
            ],
            "stream": false
        },
        "cacheKey": {
            "header": {
                "header": {},
                "skipSign": false,
                "value": "",
                "switch": "off",
                "stream": false
            },
            "skipSign": false,
            "scheme": {
                "header": {},
                "skipSign": false,
                "switch": "off",
                "stream": false
            },
            "cookie": {
                "header": {},
                "skipSign": false,
                "value": "",
                "switch": "off",
                "stream": false
            },
            "queryString": {
                "header": {},
                "skipSign": false,
                "value": "",
                "action": null,
                "switch": "off",
                "reorder": "off",
                "stream": false
            },
            "fullUrlCache": "on",
            "ignoreCase": "off",
            "cacheTag": {
                "header": {},
                "skipSign": false,
                "value": null,
                "switch": "off",
                "stream": false
            },
            "keyRules": [],
            "stream": false
        },
        "domain": "lwtest3.ruisuyun.com",
        "origin": {
            "header": {},
            "skipSign": false,
            "basePath": null,
            "serverName": "lwtest3.ruisuyun.com",
            "origins": [
                "1.1.1.1"
            ],
            "originType": "ip",
            "originCompany": null,
            "advanceHttps": {
                "header": {},
                "skipSign": false,
                "cipher": "DEFAULT",
                "certInfo": null,
                "tlsVersion": [
                    "TLSv1",
                    "TLSv1.1",
                    "TLSv1.2",
                    "TLSv1.3"
                ],
                "verifyOriginType": "off",
                "originCertInfo": null,
                "customTlsStatus": "off",
                "stream": false
            },
            "pathRules": [],
            "pathBasedOrigin": [],
            "backupOrigins": [],
            "backupOriginType": null,
            "backupServerName": null,
            "cosPrivateAccess": "off",
            "originPullProtocol": "http",
            "stream": false
        },
        "maxAge": {
            "header": {},
            "skipSign": false,
            "switch": "on",
            "maxAgeRules": [
                {
                    "header": {},
                    "skipSign": false,
                    "followOrigin": "off",
                    "maxAgeContents": [
                        "jpg"
                    ],
                    "maxAgeTime": 86400,
                    "maxAgeType": "file",
                    "stream": false
                }
            ],
            "maxAgeCodeRule": null,
            "stream": false
        },
        "appId": 1370897931,
        "status": "processing",
        "createTime": "2026-04-27 10:44:46",
        "updateTime": "2026-08-21 15:18:14",
        "projectId": 1000006311,
        "referer": {
            "header": {},
            "skipSign": false,
            "switch": "off",
            "refererRules": [],
            "stream": false
        },
        "resourceId": "cdn-ekypzght",
        "cname": "lwtest3.ruisuyun.com.ruisuyun.cn",
        "ipv6": {
            "header": {},
            "skipSign": false,
            "switch": "on",
            "stream": false
        },
        "disable": "normal",
        "readonly": "normal",
        "area": "mainland",
        "serviceType": "web",
        "parentHost": "",
        "compression": {
            "header": {},
            "skipSign": false,
            "switch": "on",
            "compressionRules": [
                {
                    "header": {},
                    "skipSign": false,
                    "algorithms": [
                        "gzip"
                    ],
                    "fileExtensions": [
                        "js",
                        "html",
                        "css",
                        "xml",
                        "json",
                        "shtml",
                        "htm"
                    ],
                    "compress": true,
                    "minLength": 256,
                    "maxLength": 2097152,
                    "ruleType": null,
                    "rulePaths": [],
                    "stream": false
                },
                {
                    "header": {},
                    "skipSign": false,
                    "algorithms": [
                        "gzip"
                    ],
                    "fileExtensions": [],
                    "compress": true,
                    "minLength": 256,
                    "maxLength": 2097152,
                    "ruleType": "contentType",
                    "rulePaths": [
                        "text/html",
                        "text/xml",
                        "text/plain",
                        "text/css",
                        "text/javascript",
                        "application/json",
                        "application/javascript",
                        "application/x-javascript",
                        "application/rss+xml",
                        "application/xml",
                        "image/svg+xml",
                        "image/tiff"
                    ],
                    "stream": false
                }
            ],
            "stream": false
        },
        "errorPage": {
            "header": {},
            "skipSign": false,
            "switch": "off",
            "pageRules": [
                {
                    "header": {},
                    "skipSign": false,
                    "statusCode": 400,
                    "redirectUrl": "http://demo.com",
                    "redirectCode": 302,
                    "stream": false
                }
            ],
            "stream": false
        },
        "accessControl": {
            "header": {},
            "skipSign": false,
            "accessControlRules": [],
            "switch": "off",
            "returnCode": 403,
            "stream": false
        },
        "webSocket": {
            "header": {},
            "skipSign": false,
            "timeout": 30,
            "switch": "off",
            "stream": false
        },
        "requestHeader": {
            "header": {},
            "skipSign": false,
            "switch": "on",
            "headerRules": [
                {
                    "header": {},
                    "skipSign": false,
                    "headerValue": "$host",
                    "headerName": "Tencent-Acceleration-Domain-Name",
                    "ruleType": "all",
                    "rulePaths": [
                        "*"
                    ],
                    "headerMode": "add",
                    "stream": false
                }
            ],
            "stream": false
        },
        "userAgentFilter": {
            "header": {},
            "skipSign": false,
            "switch": "off",
            "filterRules": [
                {
                    "header": {},
                    "skipSign": false,
                    "ruleType": "all",
                    "userAgents": [
                        "*"
                    ],
                    "filterType": "blacklist",
                    "rulePaths": [
                        "*"
                    ],
                    "stream": false
                }
            ],
            "stream": false
        },
        "responseHeader": {
            "header": {},
            "skipSign": false,
            "switch": "off",
            "headerRules": [
                {
                    "header": {},
                    "skipSign": false,
                    "headerValue": "*",
                    "headerName": "Access-Control-Allow-Origin",
                    "ruleType": "all",
                    "rulePaths": [
                        "*"
                    ],
                    "headerMode": "set",
                    "stream": false
                }
            ],
            "stream": false
        },
        "advance": "on",
        "seo": {
            "header": {},
            "skipSign": false,
            "switch": "off",
            "stream": false
        },
        "ipFreqLimit": {
            "header": {},
            "skipSign": false,
            "qps": null,
            "switch": "off",
            "stream": false
        },
        "bandwidthAlert": {
            "header": {},
            "skipSign": false,
            "metric": "bandwidth",
            "switch": "off",
            "counterMeasure": "RETURN_404",
            "lastTriggerTime": null,
            "bpsThreshold": 10000000000,
            "alertPercentage": 80,
            "statisticItems": [],
            "alertSwitch": "off",
            "lastTriggerTimeOverseas": null,
            "stream": false
        },
        "rangeOriginPull": {
            "header": {},
            "skipSign": false,
            "switch": "on",
            "rangeRules": [],
            "stream": false
        },
        "ipFilter": {
            "header": {},
            "skipSign": false,
            "filters": [],
            "switch": "off",
            "returnCode": 403,
            "filterType": "blacklist",
            "filterRules": [
                {
                    "header": {},
                    "skipSign": false,
                    "filters": [
                        "1.1.1.1"
                    ],
                    "ruleType": "all",
                    "filterType": "whitelist",
                    "rulePaths": [
                        "*"
                    ],
                    "stream": false
                }
            ],
            "stream": false
        },
        "statusCodeCache": {
            "header": {},
            "skipSign": false,
            "cacheRules": [
                {
                    "header": {},
                    "skipSign": false,
                    "statusCode": "404",
                    "cacheTime": 10,
                    "stream": false
                }
            ],
            "switch": "on",
            "stream": false
        },
        "videoSeek": {
            "header": {},
            "skipSign": false,
            "switch": "off",
            "stream": false
        },
        "https": {
            "header": {},
            "skipSign": false,
            "certInfo": null,
            "http2": "off",
            "switch": "off",
            "spdy": "off",
            "tlsVersion": [
                "TLSv1.2",
                "TLSv1.3"
            ],
            "verifyClient": "off",
            "sslStatus": "closed",
            "hsts": {
                "header": {},
                "skipSign": false,
                "maxAge": 0,
                "switch": "off",
                "includeSubDomains": "off",
                "stream": false
            },
            "clientCertInfo": null,
            "ocspStapling": "off",
            "stream": false
        },
        "forceRedirect": {
            "header": {},
            "skipSign": false,
            "switch": "off",
            "redirectType": "http",
            "carryHeaders": "off",
            "redirectStatusCode": 302,
            "stream": false
        },
        "compatibility": {
            "header": {},
            "skipSign": false,
            "code": 0,
            "stream": false
        },
        "specificConfig": {
            "header": {},
            "skipSign": false,
            "mainland": null,
            "overseas": null,
            "stream": false
        },
        "followRedirect": {
            "header": {},
            "skipSign": false,
            "switch": "off",
            "redirectConfig": {
                "header": {},
                "skipSign": false,
                "switch": "off",
                "followRedirectHost": "",
                "followRedirectBackupHost": "",
                "stream": false
            },
            "stream": false
        },
        "authentication": {
            "header": {},
            "skipSign": false,
            "switch": "on",
            "typeA": {
                "header": {},
                "skipSign": false,
                "secretKey": "jUL9XKap9ZId7QjP",
                "fileExtensions": [
                    "jpg"
                ],
                "expireTime": 1,
                "filterType": "blacklist",
                "signParam": "sign",
                "backupSecretKey": "AfNFx5YP2oivNdux",
                "stream": false
            },
            "typeC": null,
            "typeB": null,
            "typeD": null,
            "stream": false
        },
        "securityConfig": {
            "header": {},
            "skipSign": false,
            "switch": "off",
            "stream": false
        },
        "quic": {
            "header": {},
            "skipSign": false,
            "switch": "off",
            "stream": false
        },
        "qnPrivateAccess": {
            "header": {},
            "skipSign": false,
            "accessKey": null,
            "secretKey": null,
            "switch": "off",
            "stream": false
        },
        "accessPort": [
            80,
            8080,
            443
        ],
        "hwPrivateAccess": {
            "header": {},
            "skipSign": false,
            "accessKey": null,
            "secretKey": null,
            "bucket": null,
            "switch": "off",
            "stream": false
        },
        "ipv6Access": {
            "header": {},
            "skipSign": false,
            "switch": "off",
            "stream": false
        },
        "originCombine": {
            "header": {},
            "skipSign": false,
            "switch": "off",
            "stream": false
        },
        "httpsBilling": {
            "header": {},
            "skipSign": false,
            "switch": "on",
            "stream": false
        },
        "ruleEngine": {
            "header": {},
            "skipSign": false,
            "content": null,
            "switch": "off",
            "stream": false
        },
        "urlRedirect": {
            "header": {},
            "skipSign": false,
            "switch": "off",
            "pathRules": [],
            "stream": false
        },
        "advanceSet": [
            {
                "header": {},
                "skipSign": false,
                "name": "edge",
                "value": "on",
                "stream": false
            },
            {
                "header": {},
                "skipSign": false,
                "name": "last",
                "value": "on",
                "stream": false
            },
            {
                "header": {},
                "skipSign": false,
                "name": "full",
                "value": "on",
                "stream": false
            },
            {
                "header": {},
                "skipSign": false,
                "name": "quic",
                "value": "on",
                "stream": false
            },
            {
                "header": {},
                "skipSign": false,
                "name": "staging",
                "value": "off",
                "stream": false
            },
            {
                "header": {},
                "skipSign": false,
                "name": "tes_staging",
                "value": "off",
                "stream": false
            },
            {
                "header": {},
                "skipSign": false,
                "name": "overdue_offline_https",
                "value": "off",
                "stream": false
            },
            {
                "header": {},
                "skipSign": false,
                "name": "overdue_offline_apk",
                "value": "off",
                "stream": false
            },
            {
                "header": {},
                "skipSign": false,
                "name": "overdue_offline_quic",
                "value": "off",
                "stream": false
            },
            {
                "header": {},
                "skipSign": false,
                "name": "overdue_offline_single_area",
                "value": "off",
                "stream": false
            }
        ],
        "shareCname": {
            "header": {},
            "skipSign": false,
            "cname": null,
            "switch": "off",
            "stream": false
        },
        "offlineCache": {
            "header": {},
            "skipSign": false,
            "switch": "off",
            "stream": false
        },
        "postMaxSize": {
            "header": {},
            "skipSign": false,
            "maxSize": 33554432,
            "switch": "off",
            "stream": false
        },
        "imageOptimization": {
            "header": {},
            "skipSign": false,
            "guetzliAdapter": {
                "header": {},
                "skipSign": false,
                "switch": "off",
                "stream": false
            },
            "tpgAdapter": {
                "header": {},
                "skipSign": false,
                "switch": "off",
                "stream": false
            },
            "avifAdapter": {
                "header": {},
                "skipSign": false,
                "switch": "off",
                "stream": false
            },
            "webpAdapter": {
                "header": {},
                "skipSign": false,
                "switch": "off",
                "stream": false
            },
            "stream": false
        },
        "originAuthentication": {
            "header": {},
            "skipSign": false,
            "switch": "off",
            "typeA": null,
            "stream": false
        },
        "remoteAuthentication": {
            "header": {},
            "skipSign": false,
            "server": null,
            "remoteAuthenticationRules": null,
            "switch": "off",
            "stream": false
        },
        "originPullOptimization": {
            "header": {},
            "skipSign": false,
            "switch": "on",
            "optimizationType": "",
            "stream": false
        },
        "awsPrivateAccess": {
            "header": {},
            "skipSign": false,
            "region": null,
            "accessKey": null,
            "secretKey": null,
            "bucket": null,
            "switch": "off",
            "stream": false
        },
        "responseHeaderCache": {
            "header": {},
            "skipSign": false,
            "switch": "on",
            "stream": false
        },
        "ossPrivateAccess": {
            "header": {},
            "skipSign": false,
            "region": null,
            "accessKey": null,
            "secretKey": null,
            "bucket": null,
            "switch": "off",
            "stream": false
        },
        "advancedAuthentication": {
            "header": {},
            "skipSign": false,
            "typeF": null,
            "typeE": null,
            "switch": "off",
            "typeA": null,
            "typeC": null,
            "typeB": null,
            "typeD": null,
            "stream": false
        },
        "originPullTimeout": {
            "header": {},
            "skipSign": false,
            "connectTimeout": 5,
            "receiveTimeout": 10,
            "stream": false
        },
        "othersPrivateAccess": {
            "header": {},
            "skipSign": false,
            "region": null,
            "accessKey": null,
            "secretKey": null,
            "bucket": null,
            "switch": "off",
            "stream": false
        },
        "downstreamCapping": {
            "header": {},
            "skipSign": false,
            "switch": "off",
            "cappingRules": [
                {
                    "header": {},
                    "skipSign": false,
                    "ruleType": "file",
                    "rulePaths": [
                        "jpg"
                    ],
                    "kbpsThreshold": 101,
                    "stream": false
                },
                {
                    "header": {},
                    "skipSign": false,
                    "ruleType": "all",
                    "rulePaths": [
                        "*"
                    ],
                    "kbpsThreshold": 100,
                    "stream": false
                }
            ],
            "stream": false
        },
        "stream": false
    }
],
  "code": 200,
  "msg": "success"
}

5. 错误码

HTTP 状态码 / 业务提示 描述
200 成功
401 未鉴权或 Token 无效
403 无权限
参数不能为空 未传请求体
分页参数不能为空 未传 pageNumpageSize
error code:{0},message:{1} 上游查询失败,{0} 为错误码,{1} 为原因

6. 数据模型

SearchFilter

搜索条件。labeldomain 时仅使用 value 的第一个元素。

参数名称 必选 类型 描述
label String 搜索字段。取值:domain(加速域名)、https(HTTPS 状态)、resourceId(资源 ID)。示例值:domain
value Array of String 搜索值。示例值:["www.test.com"]

DetailDomain

域名详细配置。未配置的项可能为 null

参数名称 类型 描述
resourceId String 域名资源 ID。示例值:cdn-h9odj4uu
appId Long 应用 ID。示例值:1370897931
domain String 加速域名。示例值:www.test.com
cname String CNAME 接入域名
status String 域名状态。取值:online(已启动)、offline(已关闭)、deleted(已删除)、closing(关闭中)、processing(部署中)。示例值:online
projectId Long 项目 ID
serviceType String 加速业务类型。取值:web(网页)、download(下载)、media(点播)。示例值:web
createTime String 创建时间。示例值:2025-09-03 14:34:46
updateTime String 更新时间。示例值:2025-09-03 14:42:35
area String 加速区域。取值:mainland(中国境内)、overseas(中国境外)、global(全球)。示例值:mainland
disable String 封禁状态。示例值:normal
readonly String 只读状态。示例值:normal
product String 产品标识。示例值:cdn
parentHost String 父域名
origin Origin 源站配置
originPullTimeout OriginPullTimeout 回源超时配置,可能为 null
originCombine OriginCombine 合并回源配置,可能为 null
rangeOriginPull RangeOriginPull Range 回源配置,可能为 null
ipv6Access Ipv6Access IPv6 访问配置,可能为 null
https Https HTTPS 配置,可能为 null
forceRedirect ForceRedirect 访问协议强制跳转,可能为 null
cache Cache 节点缓存过期配置,可能为 null
cacheKey CacheKey 缓存键配置,可能为 null
maxAge MaxAge 浏览器缓存配置,可能为 null
statusCodeCache StatusCodeCache 状态码缓存配置,可能为 null
referer Referer Referer 防盗链配置,可能为 null
ipFilter IpFilter IP 黑白名单配置,可能为 null
userAgentFilter UserAgentFilter UA 黑白名单配置,可能为 null
authentication Authentication 时间戳防盗链配置,可能为 null
downstreamCapping DownstreamCapping 单链接限速配置,可能为 null
errorPage ErrorPage 自定义错误页面配置,可能为 null
responseHeader ResponseHeader 自定义响应头配置,可能为 null
compression Compression 智能压缩配置,可能为 null
ipFreqLimit IpFreqLimit IP 访问限频,可能为 null
bandwidthAlert BandwidthAlert 带宽封顶,可能为 null
followRedirect FollowRedirect 回源跟随 301/302,可能为 null
requestHeader RequestHeader 自定义请求头,可能为 null
seo Seo SEO 优化,可能为 null
ipv6 Ipv6 IPv6 回源,可能为 null
offlineCache OfflineCache 离线缓存,可能为 null
webSocket WebSocket WebSocket,可能为 null
quic Quic QUIC,可能为 null

Origin

源站配置。

参数名称 类型 描述
origins Array of String 源站地址列表,格式可为 IPIP:端口IP:端口:权重。示例值:["1.1.1.1"]
originType String 源站类型,如 ipdomainipv6ip_ipv6。示例值:ip
serverName String 回源 Host。示例值:www.test.com
originPullProtocol String 回源协议,如 httphttpsfollow。示例值:http

OriginPullTimeout

回源超时配置。

参数名称 类型 描述
connectTimeout Integer TCP 连接超时,单位秒
receiveTimeout Integer 回源加载超时,单位秒

OriginCombine

合并回源配置。

参数名称 类型 描述
switch String 开关。取值:on(开启)、off(关闭)。示例值:off

RangeOriginPull

Range 回源配置。

参数名称 类型 描述
switch String 开关。取值:on(开启)、off(关闭)。示例值:on
rangeRules [RangeOriginPullRule] 分路径 Range 回源规则,可能为 null

RangeOriginPullRule

分路径 Range 回源规则。

参数名称 类型 描述
switch String 开关。取值:on(开启)、off(关闭)。示例值:on
ruleType String 规则类型。取值:file(文件后缀)、directory(目录)、path(全路径)。示例值:file
rulePaths Array of String 匹配内容。file 填后缀如 jpgdirectory/xxx/testpath/xxx/test.html。示例值:["jpg"]

Ipv6Access

IPv6 访问配置。

参数名称 类型 描述
switch String 开关。取值:on(开启)、off(关闭)。示例值:off

Https

HTTPS 加速配置。

参数名称 类型 描述
switch String 开关。取值:on(开启)、off(关闭)。示例值:off
http2 String HTTP/2。取值:onoff
ocspStapling String OCSP 装订。取值:onoff
tlsVersion Array of String TLS 版本,支持 TLSv1TLSv1.1TLSv1.2TLSv1.3,须连续开启。示例值:["TLSv1.2"]
certInfo ServerCert 服务端证书,可能为 null
hsts Hsts HSTS 配置,可能为 null
sslStatus String 证书部署状态。取值:closed(已关闭)、deploying(部署中)、deployed(成功)、failed(失败)

ServerCert

HTTPS 服务端证书。上传自有证书时填写 certificateprivateKey;使用托管证书时填写 certId

参数名称 类型 描述
certId String 托管证书 ID。示例值:LE-xxxxxx
certName String 证书名称
certificate String PEM 证书内容(含完整证书链),上传自有证书时必填
privateKey String PEM 私钥内容,上传自有证书时必填
expireTime String 证书过期时间,查询返回,入参无需填写
from String 证书来源,如 upload

Hsts

HSTS 配置。

参数名称 类型 描述
switch String 开关。取值:on(开启)、off(关闭)。示例值:off
maxAge Integer Max-Age,单位秒。示例值:0
includeSubDomains String 是否包含子域名。取值:onoff

ForceRedirect

访问协议强制跳转。

参数名称 类型 描述
switch String 开关。取值:on(开启)、off(关闭)。示例值:off
redirectType String 跳转类型。取值:httphttps
redirectStatusCode Integer 跳转状态码。取值:301302
carryHeaders String 是否携带请求头。取值:onoff

Cache

节点缓存过期配置。控制台使用 ruleCache 分路径规则。

参数名称 类型 描述
ruleCache [RuleCache] 分路径缓存过期规则列表

RuleCache

一条分路径缓存规则。默认全部文件缓存 30 天;静态加速域名的 .php;.jsp;.asp;.aspx 默认不缓存。

参数名称 类型 描述
ruleType String 规则类型。取值:all(全部)、file(文件后缀)、directory(目录)、path(全路径)、index(首页)。示例值:file
rulePaths Array of String 匹配内容。all*filejpgdirectory/xxx/testpath/xxx/test.htmlindex/。示例值:["jpg"]
cacheConfig RuleCacheConfig 三种缓存模式选其一

RuleCacheConfig

路径缓存配置,cachenoCachefollowOrigin 三种模式选其一开启。

参数名称 类型 描述
cache CacheConfigCache 按指定时间缓存
noCache CacheConfigNoCache 不缓存
followOrigin CacheConfigFollowOrigin 遵循源站 Cache-Control

CacheConfigCache

按指定时间缓存。

参数名称 类型 描述
switch String 开关。取值:on(开启)、off(关闭)。示例值:on
cacheTime Integer 缓存过期时间,单位秒,最大 365 天。示例值:86400
compareMaxAge String 与源站 max-age 取较小值。取值:onoff。示例值:off
ignoreCacheControl String 强制缓存源站 no-store/no-cache 资源。取值:onoff。示例值:off
ignoreSetCookie String 源站返回 Set-Cookie 时是否仍缓存。取值:onoff。示例值:off

CacheConfigNoCache

不缓存。

参数名称 类型 描述
switch String 开关。取值:on(开启)、off(关闭)。示例值:off
revalidate String 是否总是回源校验。取值:onoff。示例值:off

CacheConfigFollowOrigin

遵循源站缓存头。

参数名称 类型 描述
switch String 开关。取值:on(开启)、off(关闭)。示例值:on

CacheKey

缓存键配置。

参数名称 类型 描述
fullUrlCache String 全路径缓存。取值:on(关闭参数忽略)、off(开启参数忽略)。示例值:off
ignoreCase String 是否忽略大小写。取值:onoff。示例值:off
queryString QueryStringKey CacheKey 是否包含请求参数,可能为 null
keyRules [KeyRule] 分路径缓存键规则,可能为 null

QueryStringKey

CacheKey 中的查询参数。

参数名称 类型 描述
switch String 开关。取值:on(开启)、off(关闭)。示例值:on
reorder String 是否重排序。取值:onoff
action String 参数处理。取值:includeAll(包含全部)、excludeAll(排除全部)、includeCustom(自定义包含)、excludeCustom(自定义排除)。示例值:includeCustom
value String 自定义参数名,用 ; 分隔。示例值:key1;key2

KeyRule

分路径缓存键规则。

参数名称 类型 描述
ruleType String 规则类型。取值:file(文件后缀)、directory(目录)、path(全路径)、index(首页)。示例值:file
rulePaths Array of String 匹配内容。filejpgdirectory/xxx/testpath/xxx/test.htmlindex/。示例值:["jpg"]
fullUrlCache String 全路径缓存。取值:onoff。示例值:off
ignoreCase String 是否忽略大小写。取值:onoff。示例值:off
queryString RuleQueryString 该路径下的查询参数处理
ruleTag String 路径缓存键标签。示例值:user

RuleQueryString

分路径查询参数处理。

参数名称 类型 描述
switch String 开关。取值:onoff。示例值:off
action String 参数处理,如 includeAllincludeCustom。示例值:includeAll
value String 自定义参数名,用 ; 分隔

MaxAge

浏览器缓存配置。

参数名称 类型 描述
switch String 开关。取值:on(开启)、off(关闭)。示例值:on
maxAgeRules [MaxAgeRule] MaxAge 规则列表,可能为 null

MaxAgeRule

一条浏览器缓存规则。maxAgeTypeall 的规则不可删除。

参数名称 类型 描述
maxAgeType String 规则类型。取值:all(全部)、file(文件后缀)、directory(目录)、path(全路径)、index(首页)。示例值:file
maxAgeContents Array of String 匹配内容。all*filejpgindex/。示例值:["jpg"]
maxAgeTime Integer 缓存时间,单位秒;0 表示不缓存。示例值:3600
followOrigin String 是否遵循源站。取值:onoff;开启时忽略 maxAgeTime

StatusCodeCache

状态码缓存配置。默认对 404 缓存 10 秒。

参数名称 类型 描述
switch String 开关。取值:on(开启)、off(关闭)。示例值:on
cacheRules [StatusCodeCacheRule] 状态码缓存规则,可能为 null

StatusCodeCacheRule

状态码缓存规则。

参数名称 类型 描述
statusCode String HTTP 状态码,支持 403404。示例值:403
cacheTime Integer 缓存时间,单位秒。示例值:3600

Referer

Referer 防盗链配置。

参数名称 类型 描述
switch String 开关。取值:on(开启)、off(关闭)。示例值:off
refererRules [RefererRule] Referer 规则列表,可能为 null

RefererRule

一条 Referer 黑白名单规则。

参数名称 类型 描述
ruleType String 规则类型。取值:all(全部)、file(文件后缀)、directory(目录)、path(全路径)。示例值:file
rulePaths Array of String 匹配内容。all*filejpg。示例值:["jpg"]
refererType String 名单类型。取值:whitelist(白名单)、blacklist(黑名单)。示例值:whitelist
referers Array of String Referer 内容列表。示例值:["qq.com"]
allowEmpty Boolean 是否允许空 Referer。白名单时 true 表示允许空 Referer;黑名单时 true 表示拒绝空 Referer。示例值:true

IpFilter

IP 黑白名单配置。黑白名单 IP 总数不超过 1000 个。

参数名称 类型 描述
switch String 开关。取值:on(开启)、off(关闭)。示例值:off
filterType String 名单类型。取值:whitelist(白名单)、blacklist(黑名单)。示例值:blacklist
filters Array of String IP 或网段列表,最多 200 个。示例值:["1.1.1.1"]
filterRules [IpFilterPathRule] 分路径 IP 规则,可能为 null
returnCode Integer 校验失败返回的状态码,支持 403404609;空值按 514。示例值:514

IpFilterPathRule

分路径 IP 黑白名单规则。

参数名称 类型 描述
filterType String 名单类型。取值:whitelist(白名单)、blacklist(黑名单)。示例值:whitelist
filters Array of String IP 或网段列表。示例值:["1.1.1.1"]
ruleType String 规则类型。取值:all(全部)、file(文件后缀)、directory(目录)、path(全路径)。示例值:file
rulePaths Array of String 匹配内容。all*filejpg。示例值:["jpg"]
remark String 备注,最多 50 个字符

UserAgentFilter

UA 黑白名单配置。规则不超过 10 条。

参数名称 类型 描述
switch String 开关。取值:on(开启)、off(关闭)。示例值:off
filterRules [UserAgentFilterRule] UA 规则列表,可能为 null

UserAgentFilterRule

一条 UA 黑白名单规则。userAgents 不超过 10 个。

参数名称 类型 描述
ruleType String 规则类型。取值:all(全部)、file(文件后缀)、directory(目录)、path(全路径)。示例值:file
rulePaths Array of String 匹配内容。示例值:["jpg"]
userAgents Array of String User-Agent 列表。示例值:["curl/7.68.0"]
filterType String 名单类型。取值:whitelist(白名单)、blacklist(黑名单)。示例值:whitelist

Authentication

时间戳防盗链配置。开启时必须且只配置一种模式,其余模式置为 null

参数名称 类型 描述
switch String 开关。取值:on(开启)、off(关闭)。示例值:off
authAlgorithm String 鉴权算法。取值:md5sha256。默认值:md5
typeA AuthenticationTypeA 模式 A,可能为 null
typeB AuthenticationTypeB 模式 B,后台升级中暂不支持配置,可能为 null
typeC AuthenticationTypeC 模式 C,可能为 null
typeD AuthenticationTypeD 模式 D,可能为 null

AuthenticationTypeA

时间戳防盗链模式 A。访问 URL 形如 http://DomainName/Filename?sign=timestamp-rand-uid-md5hash

参数名称 类型 描述
secretKey String 签名密钥,大小写字母与数字,长度 6–32
signParam String 签名参数名,不能以数字开头。示例值:sign
expireTime Integer 过期时间,单位秒,最大 630720000。示例值:7200
fileExtensions Array of String 鉴权文件扩展名,* 表示全部。示例值:["*"]
filterType String 取值:whitelist(对列表外类型鉴权)、blacklist(仅对列表内类型鉴权)。示例值:whitelist
backupSecretKey String 备用密钥,可能为 null

AuthenticationTypeB

时间戳防盗链模式 B。后台升级中,暂不支持配置;查询时仍可能返回该对象。

参数名称 类型 描述
secretKey String 签名密钥,大小写字母与数字,长度 6–32
expireTime Integer 过期时间,单位秒,最大 630720000。示例值:7200
fileExtensions Array of String 鉴权文件扩展名,* 表示全部。示例值:["*"]
filterType String 取值:whitelist(对列表外类型鉴权)、blacklist(仅对列表内类型鉴权)。示例值:whitelist
backupSecretKey String 备用密钥,可能为 null

AuthenticationTypeC

时间戳防盗链模式 C。访问 URL 形如 http://DomainName/md5hash/timestamp/FileName

参数名称 类型 描述
secretKey String 签名密钥,大小写字母与数字,长度 6–32
expireTime Integer 过期时间,单位秒,最大 630720000。示例值:7200
fileExtensions Array of String 鉴权文件扩展名,* 表示全部。示例值:["*"]
filterType String 取值:whitelistblacklist。示例值:whitelist
timeFormat String 时间戳进制。取值:dec(十进制)、hex(十六进制)。示例值:dec
backupSecretKey String 备用密钥,可能为 null

AuthenticationTypeD

时间戳防盗链模式 D。访问 URL 形如 http://DomainName/FileName?sign=md5hash&t=timestamp

参数名称 类型 描述
secretKey String 签名密钥,大小写字母与数字,长度 6–32
expireTime Integer 过期时间,单位秒,最大 630720000。示例值:7200
fileExtensions Array of String 鉴权文件扩展名,* 表示全部。示例值:["*"]
filterType String 取值:whitelistblacklist。示例值:whitelist
signParam String 签名参数名。示例值:sign
timeParam String 时间戳参数名。示例值:t
timeFormat String 时间戳进制。取值:dechex。示例值:dec
backupSecretKey String 备用密钥,可能为 null

DownstreamCapping

单链接限速配置。规则最多 100 条。

参数名称 类型 描述
switch String 开关。取值:on(开启)、off(关闭)。示例值:off
cappingRules [CappingRule] 限速规则列表,可能为 null

CappingRule

一条下行限速规则。

参数名称 类型 描述
ruleType String 规则类型。取值:all(全部)、file(文件后缀)、directory(目录)、path(全路径)。示例值:file
rulePaths Array of String 匹配内容。all*filejpg。示例值:["png"]
kBpsThreshold Integer 下行速度,单位 KB/s。示例值:100

ErrorPage

自定义错误页面(状态码重定向)配置。

参数名称 类型 描述
switch String 开关。取值:on(开启)、off(关闭)。示例值:off
pageRules [ErrorPageRule] 重定向规则,可能为 null

ErrorPageRule

一条状态码重定向规则。

参数名称 类型 描述
statusCode Integer 原状态码,支持 400403404500。示例值:404
redirectCode Integer 重定向状态码,支持 301302。示例值:301
redirectUrl String 完整跳转 URL。示例值:https://www.test.com/error.html

ResponseHeader

自定义响应头配置。规则最多 100 条。

参数名称 类型 描述
switch String 开关。取值:on(开启)、off(关闭)。示例值:off
headerRules [HttpHeaderPathRule] 响应头规则,可能为 null

HttpHeaderPathRule

一条 HTTP 头部规则。

参数名称 类型 描述
headerMode String 设置方式。取值:set(设置/覆盖)、del(删除)、add(新增)。示例值:set
headerName String 头部名称,最多 100 个字符。示例值:X-Cache-Header
headerValue String 头部值。add/set 时必填;响应头最多 2000 个字符。示例值:value
ruleType String 规则类型。取值:all(全部)、file(文件后缀)、directory(目录)、path(全路径)。示例值:file
rulePaths Array of String 匹配内容。all*filejpg。示例值:["jpg"]

Compression

智能压缩配置。默认对 jshtmlcssxmljsonshtmlhtm 且大小 256~2097152 字节的文件做 GZIP 压缩。

参数名称 类型 描述
switch String 开关。取值:on(开启)、off(关闭)。示例值:off
compressionRules [CompressionRule] 压缩规则列表,可能为 null

CompressionRule

一条智能压缩规则。指定 ruleTypefileExtensions 不生效。

参数名称 类型 描述
compress Boolean 是否启用压缩,须为 true。示例值:true
minLength Integer 触发压缩的最小文件长度,单位字节。示例值:256
maxLength Integer 触发压缩的最大文件长度,单位字节,最大 30 MB。示例值:10000
algorithms Array of String 压缩算法。取值:gzipbrotli。示例值:["gzip"]
fileExtensions Array of String 按文件后缀压缩,如 jpg。指定 ruleType 时不生效
ruleType String 规则类型。取值:allfiledirectorypathcontentType。示例值:file
rulePaths Array of String 匹配内容。filejpgcontentTypetext/html。示例值:["jpg"]

IpFreqLimit

单节点单 IP 访问限频。超出限制的请求返回 514

参数名称 类型 描述
switch String 开关。取值:on(开启)、off(关闭)。示例值:off
qps Integer 每秒请求数上限。示例值:20

BandwidthAlert

带宽/流量封顶,默认为关闭。

参数名称 类型 描述
switch String 开关。取值:on(开启)、off(关闭)。示例值:off
bpsThreshold Integer 封顶阈值。带宽单位 bps,流量单位 byte。示例值:1000000
counterMeasure String 达阈值后的操作。取值:RETURN_404(全部请求返回 404)。示例值:RETURN_404
alertSwitch String 用量提醒开关。取值:onoff。示例值:off
alertPercentage Integer 提醒百分比。示例值:80
metric String 触发维度。取值:bandwidth(带宽)、flux(流量)
statisticItems [StatisticItem] 累计用量配置

StatisticItem

累计用量封顶项。

参数名称 类型 描述
switch String 开关。取值:onoff。示例值:on
type String 封顶类型。取值:total(累计)、moment(瞬时)。示例值:total
bpsThreshold Integer 带宽或流量阈值。示例值:1000000000
counterMeasure String 关闭方式。取值:RETURN_404
metric String 指标。取值:fluxbandwidth。示例值:flux
cycle Integer 检测周期,单位分钟。取值:601440。示例值:60
unBlockTime Integer 自动解封时间。示例值:60
alertSwitch String 告警开关。取值:onoff
alertPercentage Integer 提醒百分比。示例值:80

FollowRedirect

回源 301/302 自动跟随,默认为关闭。

参数名称 类型 描述
switch String 开关。取值:on(开启)、off(关闭)。示例值:off
redirectConfig RedirectConfig 自定义 follow 请求 Host(白名单功能)

RedirectConfig

自定义回源 302 follow 的 Host。

参数名称 类型 描述
switch String 开关。取值:onoff。示例值:on
followRedirectHost String 主源站 follow 时的 Host。示例值:main.host.com
followRedirectBackupHost String 备源站 follow 时的 Host。示例值:backup.host.com

RequestHeader

自定义回源请求头,默认为关闭。规则字段见 HttpHeaderPathRule

参数名称 类型 描述
switch String 开关。取值:on(开启)、off(关闭)。示例值:off
headerRules [HttpHeaderPathRule] 请求头规则列表

Seo

SEO 搜索引擎优化,默认为关闭。

参数名称 类型 描述
switch String 开关。取值:on(开启)、off(关闭)。示例值:off

Ipv6

IPv6 回源。该配置不可更改。

参数名称 类型 描述
switch String 开关。取值:on(开启)、off(关闭)。示例值:off

OfflineCache

离线缓存。

参数名称 类型 描述
switch String 开关。取值:on(开启)、off(关闭)。示例值:off

WebSocket

WebSocket 超时。关闭时平台仍支持连接,超时默认 15 秒。

参数名称 类型 描述
switch String 开关。取值:on(可调超时)、off(关闭)。示例值:off
timeout Integer 超时时间,单位秒,最大 300。示例值:10

Quic

QUIC 访问(收费服务)。

参数名称 类型 描述
switch String 开关。取值:on(开启)、off(关闭)。示例值:off