查询自定义HTTP头配置
更新时间:2026-06-05
接口
本接口用于查询站点的自定义 HTTP 头配置。
请求接口
| Method | Path | 说明 |
|---|---|---|
| GET | /v2/geo/site/{site}/config | 查询自定义 HTTP 头配置接口 |
site:表示要查询的站点。
响应码
| HTTP Status Code | 说明 |
|---|---|
| 200 | 查询自定义 HTTP 头配置成功 |
响应体
| 参数 | 类型 | 说明 |
|---|---|---|
| httpHeader | List<HttpHeader> | 该接口会返回站点所有的配置,其中 “httpHeader” 参数表示该站点的自定义 HTTP 头配置。 |
请求示例
Plain Text
1GET /v2/geo/site/test.com/config HTTP/1.1
2Host: geo.baidubce.com
3Content-Length: 46
4Authorization: xxx
5Content-Type: application/json;charset=utf-8
6Accept-Encoding: gzip
响应示例
Plain Text
1HTTP/1.1 200 OK
2Server: nginx/1.16.1
3Content-Type: application/json; charset=utf-8
4Transfer-Encoding: chunked
5Connection: keep-alive
6
7{
8 "httpHeader": [
9 {
10 "type": "response",
11 "header": "Cache-Control",
12 "value": "test",
13 "action": "add"
14 },
15 {
16 "action": "add",
17 "type": "origin",
18 "header": "Expires",
19 "value": "test"
20 },
21 {
22 "type": "response",
23 "value": "",
24 "action": "remove",
25 "header": "Content-Type"
26 },
27 {
28 "value": "",
29 "type": "origin",
30 "action": "remove",
31 "header": "Content-Disposition"
32 }
33 ]
34}
评价此篇文章
