Initial commit
This commit is contained in:
319
reference/goedge 文档/HTTPHeaderPolicyService.md
Normal file
319
reference/goedge 文档/HTTPHeaderPolicyService.md
Normal file
@@ -0,0 +1,319 @@
|
||||
# HTTPHeaderPolicyService
|
||||
> HTTP Header策略服务
|
||||
|
||||
---
|
||||
|
||||
## createHTTPHeaderPolicy
|
||||
> 创建策略
|
||||
|
||||
- 角色:`admin`, `user`
|
||||
- HTTP:`POST https://backend.dooki.cloud/HTTPHeaderPolicyService/createHTTPHeaderPolicy`
|
||||
- RPC:`rpc createHTTPHeaderPolicy (CreateHTTPHeaderPolicyRequest) returns (CreateHTTPHeaderPolicyResponse);`
|
||||
|
||||
**请求对象 (`CreateHTTPHeaderPolicyRequest`)**
|
||||
|
||||
```json
|
||||
{}
|
||||
```
|
||||
|
||||
**响应对象 (`CreateHTTPHeaderPolicyResponse`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"httpHeaderPolicyId": "int64"
|
||||
}
|
||||
```
|
||||
|
||||
**调用示例**
|
||||
|
||||
```bash
|
||||
curl -X POST "https://backend.dooki.cloud/HTTPHeaderPolicyService/createHTTPHeaderPolicy" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
||||
-d '{
|
||||
...
|
||||
}'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## findEnabledHTTPHeaderPolicyConfig
|
||||
> 查找策略配置
|
||||
|
||||
- 角色:`admin`, `user`
|
||||
- HTTP:`POST https://backend.dooki.cloud/HTTPHeaderPolicyService/findEnabledHTTPHeaderPolicyConfig`
|
||||
- RPC:`rpc findEnabledHTTPHeaderPolicyConfig (FindEnabledHTTPHeaderPolicyConfigRequest) returns (FindEnabledHTTPHeaderPolicyConfigResponse);`
|
||||
|
||||
**请求对象 (`FindEnabledHTTPHeaderPolicyConfigRequest`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"httpHeaderPolicyId": "int64"
|
||||
}
|
||||
```
|
||||
|
||||
**响应对象 (`FindEnabledHTTPHeaderPolicyConfigResponse`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"httpHeaderPolicyJSON": "bytes"
|
||||
}
|
||||
```
|
||||
|
||||
**调用示例**
|
||||
|
||||
```bash
|
||||
curl -X POST "https://backend.dooki.cloud/HTTPHeaderPolicyService/findEnabledHTTPHeaderPolicyConfig" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
||||
-d '{
|
||||
...
|
||||
}'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## updateHTTPHeaderPolicyAddingHeaders
|
||||
> 修改AddHeaders
|
||||
|
||||
- 角色:`admin`, `user`
|
||||
- HTTP:`POST https://backend.dooki.cloud/HTTPHeaderPolicyService/updateHTTPHeaderPolicyAddingHeaders`
|
||||
- RPC:`rpc updateHTTPHeaderPolicyAddingHeaders (UpdateHTTPHeaderPolicyAddingHeadersRequest) returns (RPCSuccess);`
|
||||
|
||||
**请求对象 (`UpdateHTTPHeaderPolicyAddingHeadersRequest`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"httpHeaderPolicyId": "int64",
|
||||
"headersJSON": "bytes"
|
||||
}
|
||||
```
|
||||
|
||||
**响应对象 (`RPCSuccess`)**
|
||||
|
||||
```json
|
||||
{}
|
||||
```
|
||||
|
||||
**调用示例**
|
||||
|
||||
```bash
|
||||
curl -X POST "https://backend.dooki.cloud/HTTPHeaderPolicyService/updateHTTPHeaderPolicyAddingHeaders" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
||||
-d '{
|
||||
...
|
||||
}'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## updateHTTPHeaderPolicyAddingTrailers
|
||||
> 修改AddTrailers
|
||||
|
||||
- 角色:`admin`, `user`
|
||||
- HTTP:`POST https://backend.dooki.cloud/HTTPHeaderPolicyService/updateHTTPHeaderPolicyAddingTrailers`
|
||||
- RPC:`rpc updateHTTPHeaderPolicyAddingTrailers (UpdateHTTPHeaderPolicyAddingTrailersRequest) returns (RPCSuccess);`
|
||||
|
||||
**请求对象 (`UpdateHTTPHeaderPolicyAddingTrailersRequest`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"httpHeaderPolicyId": "int64",
|
||||
"headersJSON": "bytes"
|
||||
}
|
||||
```
|
||||
|
||||
**响应对象 (`RPCSuccess`)**
|
||||
|
||||
```json
|
||||
{}
|
||||
```
|
||||
|
||||
**调用示例**
|
||||
|
||||
```bash
|
||||
curl -X POST "https://backend.dooki.cloud/HTTPHeaderPolicyService/updateHTTPHeaderPolicyAddingTrailers" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
||||
-d '{
|
||||
...
|
||||
}'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## updateHTTPHeaderPolicyCORS
|
||||
> 修改策略CORS设置
|
||||
|
||||
- 角色:`admin`, `user`
|
||||
- HTTP:`POST https://backend.dooki.cloud/HTTPHeaderPolicyService/updateHTTPHeaderPolicyCORS`
|
||||
- RPC:`rpc updateHTTPHeaderPolicyCORS(UpdateHTTPHeaderPolicyCORSRequest) returns (RPCSuccess);`
|
||||
|
||||
**请求对象 (`UpdateHTTPHeaderPolicyCORSRequest`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"httpHeaderPolicyId": "int64",
|
||||
"corsJSON": "bytes"
|
||||
}
|
||||
```
|
||||
|
||||
**响应对象 (`RPCSuccess`)**
|
||||
|
||||
```json
|
||||
{}
|
||||
```
|
||||
|
||||
**调用示例**
|
||||
|
||||
```bash
|
||||
curl -X POST "https://backend.dooki.cloud/HTTPHeaderPolicyService/updateHTTPHeaderPolicyCORS" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
||||
-d '{
|
||||
...
|
||||
}'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## updateHTTPHeaderPolicyDeletingHeaders
|
||||
> 修改删除的Headers
|
||||
|
||||
- 角色:`admin`, `user`
|
||||
- HTTP:`POST https://backend.dooki.cloud/HTTPHeaderPolicyService/updateHTTPHeaderPolicyDeletingHeaders`
|
||||
- RPC:`rpc updateHTTPHeaderPolicyDeletingHeaders (UpdateHTTPHeaderPolicyDeletingHeadersRequest) returns (RPCSuccess);`
|
||||
|
||||
**请求对象 (`UpdateHTTPHeaderPolicyDeletingHeadersRequest`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"httpHeaderPolicyId": "int64",
|
||||
"headerNames": "[]string"
|
||||
}
|
||||
```
|
||||
|
||||
**响应对象 (`RPCSuccess`)**
|
||||
|
||||
```json
|
||||
{}
|
||||
```
|
||||
|
||||
**调用示例**
|
||||
|
||||
```bash
|
||||
curl -X POST "https://backend.dooki.cloud/HTTPHeaderPolicyService/updateHTTPHeaderPolicyDeletingHeaders" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
||||
-d '{
|
||||
...
|
||||
}'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## updateHTTPHeaderPolicyNonStandardHeaders
|
||||
> 修改非标的Headers
|
||||
|
||||
- 角色:`admin`, `user`
|
||||
- HTTP:`POST https://backend.dooki.cloud/HTTPHeaderPolicyService/updateHTTPHeaderPolicyNonStandardHeaders`
|
||||
- RPC:`rpc updateHTTPHeaderPolicyNonStandardHeaders(UpdateHTTPHeaderPolicyNonStandardHeadersRequest) returns (RPCSuccess);`
|
||||
|
||||
**请求对象 (`UpdateHTTPHeaderPolicyNonStandardHeadersRequest`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"httpHeaderPolicyId": "int64 // Header策略ID",
|
||||
"headerNames": "[]string // 非标Header名称列表"
|
||||
}
|
||||
```
|
||||
|
||||
**响应对象 (`RPCSuccess`)**
|
||||
|
||||
```json
|
||||
{}
|
||||
```
|
||||
|
||||
**调用示例**
|
||||
|
||||
```bash
|
||||
curl -X POST "https://backend.dooki.cloud/HTTPHeaderPolicyService/updateHTTPHeaderPolicyNonStandardHeaders" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
||||
-d '{
|
||||
...
|
||||
}'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## updateHTTPHeaderPolicyReplacingHeaders
|
||||
> 修改ReplaceHeaders
|
||||
|
||||
- 角色:`admin`, `user`
|
||||
- HTTP:`POST https://backend.dooki.cloud/HTTPHeaderPolicyService/updateHTTPHeaderPolicyReplacingHeaders`
|
||||
- RPC:`rpc updateHTTPHeaderPolicyReplacingHeaders (UpdateHTTPHeaderPolicyReplacingHeadersRequest) returns (RPCSuccess);`
|
||||
|
||||
**请求对象 (`UpdateHTTPHeaderPolicyReplacingHeadersRequest`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"httpHeaderPolicyId": "int64",
|
||||
"headersJSON": "bytes"
|
||||
}
|
||||
```
|
||||
|
||||
**响应对象 (`RPCSuccess`)**
|
||||
|
||||
```json
|
||||
{}
|
||||
```
|
||||
|
||||
**调用示例**
|
||||
|
||||
```bash
|
||||
curl -X POST "https://backend.dooki.cloud/HTTPHeaderPolicyService/updateHTTPHeaderPolicyReplacingHeaders" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
||||
-d '{
|
||||
...
|
||||
}'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## updateHTTPHeaderPolicySettingHeaders
|
||||
> 修改SetHeaders
|
||||
|
||||
- 角色:`admin`, `user`
|
||||
- HTTP:`POST https://backend.dooki.cloud/HTTPHeaderPolicyService/updateHTTPHeaderPolicySettingHeaders`
|
||||
- RPC:`rpc updateHTTPHeaderPolicySettingHeaders (UpdateHTTPHeaderPolicySettingHeadersRequest) returns (RPCSuccess);`
|
||||
|
||||
**请求对象 (`UpdateHTTPHeaderPolicySettingHeadersRequest`)**
|
||||
|
||||
```json
|
||||
{
|
||||
"httpHeaderPolicyId": "int64",
|
||||
"headersJSON": "bytes"
|
||||
}
|
||||
```
|
||||
|
||||
**响应对象 (`RPCSuccess`)**
|
||||
|
||||
```json
|
||||
{}
|
||||
```
|
||||
|
||||
**调用示例**
|
||||
|
||||
```bash
|
||||
curl -X POST "https://backend.dooki.cloud/HTTPHeaderPolicyService/updateHTTPHeaderPolicySettingHeaders" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
||||
-d '{
|
||||
...
|
||||
}'
|
||||
```
|
||||
|
||||
---
|
||||
Reference in New Issue
Block a user