Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nacos域名如果包含register会无法登陆 #12670

Closed
juhuan opened this issue Sep 19, 2024 · 0 comments
Closed

nacos域名如果包含register会无法登陆 #12670

juhuan opened this issue Sep 19, 2024 · 0 comments
Labels
area/Nacos console Related to Nacos consle contribution welcome kind/bug Category issues or prs related to bug.

Comments

@juhuan
Copy link
Contributor

juhuan commented Sep 19, 2024

Describe the bug
版本: 2.4.0
绑定域名register.xxx.com后,第一次登陆报错403 user not found,第二次以及后续登陆会重定向到login页面。永远都被困在login页。

console-ui/src/utils/request.js:85
CleanShot 2024-09-19 at 15 37 59@2x
👆这段代码不应该用整个url去判断,nacos实际path都是#后的那段path,用hash判断比较合适。我的域名是register.xxx.com,登陆成功后跳转的整个url就是http://register.xxx.com/nacos/#/serviceManagement,正好命中了/register

CleanShot 2024-09-19 at 15 38 36@2x
👆进入这段逻辑就会把login时写入到本地缓存的token清理掉,并重定向到login页面,造成永远被困login页的情况。

看代码是2.4.0才引入的问题:
CleanShot 2024-09-19 at 17 01 51@2x

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):

  • OS: [e.g. Centos]
  • Version [e.g. nacos-server 1.3.1, nacos-client 1.3.1]
  • Module [e.g. naming/config]
  • SDK [e.g. original, spring-cloud-alibaba-nacos, dubbo]

Additional context
Add any other context about the problem here.

@KomachiSion KomachiSion added contribution welcome kind/bug Category issues or prs related to bug. area/Nacos console Related to Nacos consle labels Sep 19, 2024
juhuan pushed a commit to juhuan/nacos that referenced this issue Sep 19, 2024
juhuan pushed a commit to juhuan/nacos that referenced this issue Sep 26, 2024
KomachiSion pushed a commit that referenced this issue Sep 27, 2024
…register. (#12670) (#12671)

Co-authored-by: 俱欢 <juhuan.wy@antfin.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/Nacos console Related to Nacos consle contribution welcome kind/bug Category issues or prs related to bug.
Projects
None yet
Development

No branches or pull requests

2 participants