版本:v5 | Claude Code 2.1.220 | 2026-07-31

底部状态栏自定义

使用命令:

1
/statusline

实现WebFetch可访问

问题:

联网时出现:

Error: Unable to verify if domain www.baidu.com is safe to fetch. This may be due to network restrictions or enterprise security policies blocking claude.ai.

解决方法:

.claude\settings.json配置文件中增加配置:”skipWebFetchPreflight”: true(跳过 WebFetch 域名安全预检)

原因:

Claude Code 的 WebFetch 在发起实际 HTTP 请求前,会先向 claude.ai发送域名安全预检请求。claude.ai 前面部署了 Cloudflare Bot Protection,从 headless CLI 发出的请求会被 Cloudflare 返回 403 JavaScript challenge,而 CLI 环境无法执行 JS,所以预检永远失败。错误提示里说的 “network restrictions” 其实具有误导性——真正卡住的是 Anthropic 自己 CDN 上的 Cloudflare