[GH-ISSUE #220] CORS 预检处理可能不合规,API请求被拦截 #161

Closed
opened 2026-02-27 07:18:17 +03:00 by kerem · 1 comment
Owner

Originally created by @Mizoreee on GitHub (Jan 12, 2026).
Original GitHub issue: https://github.com/justlovemaki/AIClient-2-API/issues/220

在手机端 Chatbox App 中调用Claude API 时请求一直失败,持续返回 API Error: Error from Claude: TypeError: Load failed。

访问日志看到反复的 OPTIONS /v1/messages 204,而真实的 POST 请求未发送。
可能接口对 CORS 预检请求的处理不符合规范:虽然返回了 204,但缺少 Access-Control-Allow-Origin / Methods / Headers,导致客户端判定预检失败并直接拦截后续请求。

Originally created by @Mizoreee on GitHub (Jan 12, 2026). Original GitHub issue: https://github.com/justlovemaki/AIClient-2-API/issues/220 在手机端 Chatbox App 中调用Claude API 时请求一直失败,持续返回 API Error: Error from Claude: TypeError: Load failed。 访问日志看到反复的 OPTIONS /v1/messages 204,而真实的 POST 请求未发送。 可能接口对 CORS 预检请求的处理不符合规范:虽然返回了 204,但缺少 Access-Control-Allow-Origin / Methods / Headers,导致客户端判定预检失败并直接拦截后续请求。
kerem closed this issue 2026-02-27 07:18:17 +03:00
Author
Owner

@justlovemaki commented on GitHub (Jan 13, 2026):

Chatbox 用最新版试试,如果不行,请按规范提问 #128

<!-- gh-comment-id:3741962983 --> @justlovemaki commented on GitHub (Jan 13, 2026): Chatbox 用最新版试试,如果不行,请按规范提问 #128
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/AIClient-2-API-justlovemaki#161
No description provided.