Repository navigation
fix(review): 允许宿主支持的本地预览地址 - #132
Merged
GaoWeiLiuXD merged 1 commit intoSep 22, 2026
Merged
Conversation
Signed-off-by: liugaowei <liugaowei@xd.com>
|
9 tasks done
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.
What changed / 改了什么
仅修正
.greptile/config.json的network-allowlist规则:允许preview.hosts声明宿主支持的localhost、127.0.0.1、[::1],并通过宿主 preview 能力打开匹配的本地 URL;不再仅因回环地址或 HTTP 判为 P1。Why / 为什么
TapTap Maker 等本地控制台依赖回环地址。原规则把这类宿主已有能力与插件自行访问内网混为一谈,造成误报。相关场景见 #131。
已对照宿主源码
GHOST_PREVIEW_LOOPBACK_HOSTS、GhostPreviewSlot.handleRequest与ghostPreviewUrlAllowed调用链:清单需要声明预览范围,打开 URL 时仍由宿主校验。例外不扩展到network.hosts、其他内网地址或插件自行直连。Checklist
Tool declaration changes / 工具声明改动
无。
Verification / 验证
git diff --check通过。plugin-contract、localization、provisioning、publish-workflows、binary-dependencies五组检查(24 项 Node 测试)。check-source-size.mjs通过。Sensitive changes / 敏感变更
本次修改
.greptile/审查策略,需要维护者人工 review;现有敏感变更路由和自动 approve 排除配置保持有效。例外仅对齐宿主已有本地 preview 能力,不修改运行时鉴权实现。