CTG海外融合CDN API
  1. 域名配置
CTG海外融合CDN API
  • 鉴权说明
  • API鉴权
    • 获取token代码示例
    • 鉴权接口
  • 域名操作
    • 域名创建
    • 域名开启
    • 域名关闭
    • 域名删除
    • 获取域名列表
  • 域名配置
    • 查询域名源站
      GET
    • 设置域名源站
      PUT
    • 查询域名回源host
      GET
    • 设置域名回源host
      PUT
    • 查询域名HTTPS
      GET
    • 设置域名HTTPS
      PUT
    • 查询域名是否强制跳转HTTPS
      GET
    • 设置域名强制跳转HTTPS
      PUT
    • 查询域名智能压缩
      GET
    • 设置域名智能压缩
      PUT
    • 查询域名IPV6
      GET
    • 设置域名IPV6
      PUT
    • 查询域名HTTP响应头域
      GET
    • 设置域名HTTP响应头域
      POST
    • 查询域名IP 黑白名单
      GET
    • 设置域名IP黑白名单
      POST
    • 查询域名Referer黑白名单
      GET
    • 设置域名Referer黑白名单
      POST
    • 查询域名UA黑白名单
      GET
    • 设置域名UA黑白名单
      POST
    • 查询域名回源协议
      GET
    • 设置域名回源协议
      PUT
    • 查询域名回源HTTP请求头
      GET
    • 设置域名回源HTTP请求头
      POST
    • 查询域名HTTP/2
      GET
    • 设置域名HTTP/2
      PUT
    • 查询域名HTTP/3
      GET
    • 设置域名HTTP/3
      PUT
    • 查询域名最低tls版本
      GET
    • 设置域名最低tls版本
      PUT
    • 查询域名回源超时时间(仅限AWS渠道)
      GET
    • 设置域名回源超时时间(仅限AWS渠道)
      PUT
    • 查询国家/地区数据(ISO)
      GET
    • 查询域名区域访问控制(仅限AWS渠道)
      GET
    • 设置域名区域访问控制(仅限AWS渠道)
      PUT
    • 获取AWS缓存策略列表
      GET
    • 查询域名缓存策略
      GET
    • 设置域名缓存策略
      PUT
    • 获取AWS回源请求头策略列表
      GET
    • 获取AWS响应头策略列表
      GET
    • 获取加速域名的AWS回源请求头策略(仅限AWS渠道)
      GET
    • 设置加速域名的AWS回源请求头策略(仅限AWS渠道)
      PUT
    • 获取加速域名的AWS响应头策略(仅限AWS渠道)
      GET
    • 设置加速域名的AWS响应头策略(仅限AWS渠道)
      PUT
  • 证书管理
    • 申请AWS证书
    • 获取AWS签发证书的验证信息
    • 上传证书
    • 更新证书
    • 获取证书列表
  • 内容管理
    • 根据预热URL获取用户的AWS预热区域和预热国家
    • 根据预热区域获取aws的所有pop点(国家)列表
    • 预取内容
    • 查询预取状态
    • 刷新内容
    • 查询刷新状态
  • 统计分析
    • 查询CDN消耗明细
    • 查询HTTP状态码请求数明细数据
    • 查询国家、地区消耗明细
    • Top域名
    • Top URL
    • Top Referer
    • Top UA
    • 查询命中流量
    • 查询命中请求数
    • 查询请求数
    • 查询HTTP状态码请求数汇总
  • 日志管理
    • 日志下载列表
  • 工单管理
    • 获取工单类型
    • 创建工单
    • 获取工单列表
    • 取消工单
    • 关闭工单
    • 重开工单
    • 删除工单
    • 获取工单沟通记录
    • 发送工单沟通消息
  1. 域名配置

设置域名HTTP响应头域

POST
/API/cdn/domain/http/response/headers
设置域名HTTP响应头域

请求参数

Header 参数

Body 参数application/json

示例
{
    "domain": "apitest1.rgslb.link",
    "enable_cors": true,
    "cors_config": {
        "access_control_allow_origins": {
            "type": "*",
            "values": []
        },
        "access_control_allow_headers": {
            "type": "*",
            "values": [
                "host",
                "user-agent"
            ]
        },
        "access_control_allow_methods": {
            "type": "customize",
            "values": [
                "GET",
                "POST"
            ]
        },
        "access_control_expose_headers": {
            "type": "none",
            "values": []
        },
        "access_control_max_age_sec": 604
    },
    "security_headers_config": {
        "strict_transport_security": {
            "enable": true,
            "access_control_max_age_sec": 31536000,
            "preload": true,
            "include_subdomains": false
        },
        "content_type_options": {
            "enable": true
        },
        "frame_options": {
            "enable": true,
            "frame_option": "SAMEORIGIN"
        },
        "xss_orotection": {
            "enable": true,
            "protection": 1,
            "mode_block": true,
            "report_uri": "http://www.baidu.com"
        },
        "referrer_policy": {
            "enable": true,
            "referrer_policy": "no-referrer"
        },
        "content_security_policy": {
            "enable": true,
            "content_security_policy": "default-src"
        }
    },
    "custom_headers_config": [
        {
            "key": "CDN",
            "value": "fusion"
        },
        {
            "key": "test",
            "value": "fusion-test"
        }
    ],
    "remove_headers_config": [
        {
            "key": "date"
        }
    ]
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://ctgcdn.esurfingcloud.com/API/cdn/domain/http/response/headers' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "domain": "apitest1.rgslb.link",
    "enable_cors": true,
    "cors_config": {
        "access_control_allow_origins": {
            "type": "*",
            "values": []
        },
        "access_control_allow_headers": {
            "type": "*",
            "values": [
                "host",
                "user-agent"
            ]
        },
        "access_control_allow_methods": {
            "type": "customize",
            "values": [
                "GET",
                "POST"
            ]
        },
        "access_control_expose_headers": {
            "type": "none",
            "values": []
        },
        "access_control_max_age_sec": 604
    },
    "security_headers_config": {
        "strict_transport_security": {
            "enable": true,
            "access_control_max_age_sec": 31536000,
            "preload": true,
            "include_subdomains": false
        },
        "content_type_options": {
            "enable": true
        },
        "frame_options": {
            "enable": true,
            "frame_option": "SAMEORIGIN"
        },
        "xss_orotection": {
            "enable": true,
            "protection": 1,
            "mode_block": true,
            "report_uri": "http://www.baidu.com"
        },
        "referrer_policy": {
            "enable": true,
            "referrer_policy": "no-referrer"
        },
        "content_security_policy": {
            "enable": true,
            "content_security_policy": "default-src"
        }
    },
    "custom_headers_config": [
        {
            "key": "CDN",
            "value": "fusion"
        },
        {
            "key": "test",
            "value": "fusion-test"
        }
    ],
    "remove_headers_config": [
        {
            "key": "date"
        }
    ]
}'

返回响应

🟢200成功
application/json
Body

示例
{"code":1,"message":"OK","data":[{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Headers","value":"*"},{"key":"Access-Control-Allow-Methods","value":"GET,POST"},{"key":"Access-Control-Max-Age","value":604},{"key":"CDN","value":"fusion"},{"key":"test","value":"fusion-test"},{"key":"date","action":"remove"}],"domain":"apitest1.rgslb.link"}
上一页
查询域名HTTP响应头域
下一页
查询域名IP 黑白名单
Built with