git commit -m "fix: 修复跨用户访问devcontainer时的CORS和404错误 #62
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/cors-404-devcontainer-cross-user"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
问题描述:
当用户A访问用户B的仓库创建devcontainer时,web terminal轮询容器状态会出现CORS错误和404错误。
根本原因:
终端URL参数构建时使用了ctx.Doer.Name(当前登录用户)而不是ctx.Repo.Owner.Name(仓库所有者),导致:
路由匹配失败,返回404
404响应缺少CORS头,浏览器报CORS错误