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-Match | header | string | 是 | ETag returned by the GET (or the previous PUT) the form was loaded from. |
|---|
请求体
application/json · 必填:是
updateAgentGatewaySettings 请求体| 名称 | 类型 | 必填 | 说明 |
|---|
trusted_proxies | array<object> | 是 | Trusted CDN back-to-origin ranges. Only Cloudflare is preset (CF-Connecting-IP); an empty header binds X-Forwarded-For. |
|---|
entrypoints | array<object> | 是 | Extra node entry points listed after the online Gateways, e.g. a CDN's 443 with transport ws. |
|---|
响应
updateAgentGatewaySettings 响应| 状态码 | 说明 |
|---|
200 | Saved (normalized). ETag is the digest of the saved settings. 字段:trusted_proxies: array<object> entrypoints: array<object> |
|---|
409 | gateway_settings_changed (someone else saved since the form was loaded; reload and retry) |
|---|
422 | invalid_input |
|---|
428 | precondition_required (If-Match missing or repeated) |
|---|
失败时怎么办
409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。428 缺少前置条件:回读资源,带 If-Match(或页面要求的验证)再提交。
↑ 回到列表