Skip to content

修复 daemon 请求被 Cloudflare 拦截 - #10

Closed
earayu wants to merge 1 commit into
mainfrom
fix/computerd-user-agent
Closed

修复 daemon 请求被 Cloudflare 拦截#10
earayu wants to merge 1 commit into
mainfrom
fix/computerd-user-agent

Conversation

@earayu

@earayu earayu commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

问题

apemind-computerd 使用 urllib 默认 User-Agent: Python-urllib/...,staging Cloudflare 返回 403 error code: 1010,导致 Computer 无法 join。

修复

  • 所有控制面请求固定发送 User-Agent: apemind-computer
  • 增加请求头回归测试

这是最小修复,不改重试、鉴权或协议。

验证

  • uv run --with pytest pytest sandbox-image/test_apemind_computerd.py:6 passed
  • 同一 staging URL/token:默认 urllib UA 返回 403;加入该 UA 后 join/heartbeat/desired/observed 均为 200

Refs #3

@earayu

earayu commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator Author

关闭重复 PR:同一 User-Agent 修复已由 #9 合入 main(3f7299f5)。本 PR 的本机验证结论保留:6 个 daemon 单测通过,staging join/heartbeat/desired/observed 均为 200。

@earayu earayu closed this Aug 25, 2026
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