Repository navigation
Conversation
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.
修改
将 UserService v1/v2 路由的 JWT 本机豁免从
c.RealIP()改为同时核对 TCP 对端和代理转发来源。仅在对端与已记录的原始来源均为本机时保留现有本机服务调用;来源冲突或不明确时继续验证 JWT。增加直连、Gateway 转发、IPv6 与伪造来源头的回归测试。此改动与初始化注册密钥 PR #48 分属不同分支,不包含其注册逻辑修改。
对应问题
阻止无令牌请求仅凭自填的本机来源请求头跳过 UserService 的 JWT 中间件。
验证