方法路径摘要认证
GET/v1/admin/gateway-settingsTrusted CDN ranges and extra node entry points published to every Gateway登录会话
PUT/v1/admin/gateway-settingsReplace both lists (Gateways pick them up within a minute; audited)登录会话

契约文件:api/openapi/v1/control.yaml

接口详情

GET /v1/admin/gateway-settings

Trusted CDN ranges and extra node entry points published to every Gateway

operationId
getAgentGatewaySettings
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

响应

getAgentGatewaySettings 响应
状态码说明
200Settings. ETag is the content digest to send back in If-Match when saving.

字段:trusted_proxies: array<object> entrypoints: array<object>

401认证失败或会话已失效。
403当前身份没有执行该操作的权限。

失败时怎么办

  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。

↑ 回到列表

PUT /v1/admin/gateway-settings

Replace both lists (Gateways pick them up within a minute; audited)

operationId
updateAgentGatewaySettings
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

契约没有单独标注权限码,权限要求见下方说明与 403 响应。

说明(契约原文)

Optimistic concurrency without a stored revision. If-Match must equal the ETag of the current settings (compared under the table lock); otherwise nothing is written and 409 gateway_settings_changed tells the page to reload.

参数

updateAgentGatewaySettings 参数
名称位置类型必填说明
If-Matchheaderstring是ETag returned by the GET (or the previous PUT) the form was loaded from.

请求体

application/json · 必填:是

updateAgentGatewaySettings 请求体
名称类型必填说明
trusted_proxiesarray<object>是Trusted CDN back-to-origin ranges. Only Cloudflare is preset (CF-Connecting-IP); an empty header binds X-Forwarded-For.
entrypointsarray<object>是Extra node entry points listed after the online Gateways, e.g. a CDN's 443 with transport ws.

响应

updateAgentGatewaySettings 响应
状态码说明
200Saved (normalized). ETag is the digest of the saved settings.

字段:trusted_proxies: array<object> entrypoints: array<object>

409gateway_settings_changed (someone else saved since the form was loaded; reload and retry)
422invalid_input
428precondition_required (If-Match missing or repeated)

失败时怎么办

  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 428 缺少前置条件:回读资源,带 If-Match(或页面要求的验证)再提交。

↑ 回到列表