Repository navigation
fix(api): 修复独立模式接口鉴权与异常请求处理 - #172
Merged
Merged
Conversation
Owner
|
感谢修复,鉴权这块的改动我看过没问题;不过仓库暂时不打算加这条 CI 流水线,麻烦把 |
Contributor
Author
|
好的,明白。我现在已经进行了修改 |
LACANIA
force-pushed
the
fix/local-api-security
branch
from
October 23, 2026 02:34
516eecc to
5cc2532
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
独立模式在权限检查与业务路由中使用了不同的路径解码规则,编码后的聊天接口可以跳过令牌检查;独立应用仅按
Origin区分桌面与网页请求,无法区分本地文件页面和同样产生null来源的沙盒网页。另外,应用入口解析异常地址时会产生未捕获异常。本 PR 补齐这些接口检查,并保持桌面页面和托盘的正常调用:
修复提交的本地验证结果:
npm test,1026 项通过,0 项失败。npm run typecheck、npm run lint、npm run format:check、npm run bundle全部通过,四个入口均构建成功。本地测试使用虚构数据与临时服务,开发依赖复用现有安装;全新锁文件安装未单独验证。浏览器验证使用隔离页面与业务接口替身,未对公网网站的完整利用条件作出判断。