mirror of
https://github.com/justlovemaki/AIClient-2-API.git
synced 2026-04-26 01:45:56 +03:00
[PR #195] [MERGED] fix(kiro): 修复批量导入请求缺少认证头的问题,出现401错误,已经回归验证。 #294
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/AIClient-2-API-justlovemaki#294
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/justlovemaki/AIClient-2-API/pull/195
Author: @leonaii
Created: 1/9/2026
Status: ✅ Merged
Merged: 1/9/2026
Merged by: @justlovemaki
Base:
main← Head:main📝 Commits (2)
03940edfix(kiro): 修复批量导入请求缺少认证头的问题,出现401错误7e5470cMerge branch 'justlovemaki:main' into main📊 Changes
1 file changed (+2 additions, -2 deletions)
View changed files
📝
static/app/provider-manager.js(+2 -2)📄 Description
问题描述
Kiro 批量导入 refreshToken 功能在启用 UI 认证的情况下会返回 401 Unauthorized 错误。
原因分析
批量导入功能使用原生
fetchAPI 发送 SSE 流式请求,但没有携带认证头信息,导致服务端认证失败。解决方案
在 fetch 请求中添加认证头:
window.apiClient.getAuthHeaders()获取完整的认证头Content-Type头修改的文件
static/app/provider-manager.js代码变更