Skip to content

Conversation

@rqi14
Copy link

@rqi14 rqi14 commented May 19, 2025

修复pull n8n时遇到的错误
user@ubuntu:/srv/n8n$ sudo docker pull n8n.cf-example.com/n8nio/n8n [sudo] password for user:
Using default tag: latest
Error response from daemon: Head "https://n8n.cf-example.com/v2/n8nio/n8n/manifests/latest": Get "https://auth.docker.io/token?scope=repository%3An8nio%2Fn8n%3Apull&service=registry.docker.io": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

修复pull n8n时遇到的错误
user@ubuntu:/srv/n8n$ sudo docker pull n8n.cf-example.com/n8nio/n8n
[sudo] password for user:
Using default tag: latest
Error response from daemon: Head "https://n8n.cf-example.com/v2/n8nio/n8n/manifests/latest": Get "https://auth.docker.io/token?scope=repository%3An8nio%2Fn8n%3Apull&service=registry.docker.io": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
@rqi14 rqi14 changed the title Update _worker.js 修复pull n8n时遇到的错误 May 19, 2025
@rqi14
Copy link
Author

rqi14 commented Jul 24, 2025

唯一的关键修改:
添加了 finalizeHeadersForClient 函数 - 更好的认证头重写
在关键位置使用 finalizeHeadersForClient 替代简单正则:
Token响应处理
主要响应处理
预认证的manifests/blobs请求

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