nacos域名如果包含register会无法登陆 #12670
Labels
area/Nacos console
Related to Nacos consle
contribution welcome
kind/bug
Category issues or prs related to bug.
Describe the bug
版本: 2.4.0
绑定域名register.xxx.com后,第一次登陆报错403 user not found,第二次以及后续登陆会重定向到login页面。永远都被困在login页。
console-ui/src/utils/request.js:85
👆这段代码不应该用整个url去判断,nacos实际path都是#后的那段path,用hash判断比较合适。我的域名是register.xxx.com,登陆成功后跳转的整个url就是http://register.xxx.com/nacos/#/serviceManagement,正好命中了/register
👆进入这段逻辑就会把login时写入到本地缓存的token清理掉,并重定向到login页面,造成永远被困login页的情况。
看代码是2.4.0才引入的问题:
Expected behavior
A clear and concise description of what you expected to happen.
Actually behavior
A clear and concise description of what you actually to happen.
How to Reproduce
本地绑定个hosts,域名中包含register就能重现
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: