Fix/auth/login url context path#312
Open
GoofySatoshi wants to merge 2 commits intonacos-group:masterfrom
Open
Conversation
- Fixed 'get access token failed' error when nacos.server.contextPath is customized - Updated auth_client.py to correctly construct the login URL with the server context path - Ensures compatibility with Nacos Server 3.0.3+ custom context configurations - Resolves issue nacos-group#300
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.
Fix Summary
修复了当
context_path='/'时,访问 login 登录 URL 硬编码产生 token 获取失败的问题。向前兼容了默认nacos注册中心启动时,默认前缀为
/nacos的情况Changes
v2/nacos/common/client_config.py: 优化 context_path 处理逻辑v2/nacos/transport/auth_client.py: 正确拼接登录 URLTest Coverage