Skip to content

feat: 域名页一键直达 Cloudflare 的域名绑定页 - #103

Merged
YoungSx merged 1 commit into
mainfrom
add-go-bind-button-to-worker-domain-page
Sep 7, 2026
Merged

feat: 域名页一键直达 Cloudflare 的域名绑定页#103
YoungSx merged 1 commit into
mainfrom
add-go-bind-button-to-worker-domain-page

Conversation

@YoungSx

@YoungSx YoungSx commented Sep 7, 2026

Copy link
Copy Markdown
Owner

内容

「绑定的域名」页目前纯只读:列出绑定,不管下一步。操作者发现要加域名后,还得自己去 dash 翻 Worker 列表。

  • 后端 /api/domains configured 响应新增 accountId(非机密,本就在每个 dash URL 里;token 仍永不进响应,测试钉死)
  • 前端用它拼深链 dash.cloudflare.com/{account}/workers/services/view/{script}/production/domains(格式经两处独立代码源核实),在「重新读取」旁渲染「去绑定」外链(Base UI render prop → <a target="_blank" rel="noreferrer">
  • accountId(未配置凭据)就不显示按钮,不猜账户

验证

  • npm run check(CI 同款)exit=0,零 error,371 测试全过
  • 新增后端测试:configured 时 accountId 等于配置值;unconfigured 时该字段省略

🤖 Generated with Claude Code

页面原本只读:列出绑定却不管下一步。现在 configured 响应带上 accountId
(非机密,本就在每个 dash URL 里),前端用它拼
dash.cloudflare.com/{account}/workers/services/view/{script}/production/domains
的外链,放在「重新读取」旁;缺 accountId 就不显示,不猜。
token 仍永不进响应,测试钉死两条边界。

Co-Authored-By: Claude <noreply@anthropic.com>
@YoungSx
YoungSx merged commit 68fed9d into main Sep 7, 2026
1 check passed
@YoungSx
YoungSx deleted the add-go-bind-button-to-worker-domain-page branch September 7, 2026 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant