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

[Bug]: 动态路由模式下,当首页路由有变更的情况下,登录页重定向的首页redirect是取自本地的,没有保持和后端返回的一致 #511

Closed
honghuangdc opened this issue Jun 18, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@honghuangdc
Copy link
Member

软件版本

1.2.5

运行环境

MacOS

运行架构

None

重现步骤

从首页退出登录,登录路由路径带有参数redirect=/home,此时变更后端返回的home路由,登录后404

期望的结果是什么?

登录能正常重定向到正确的首页

实际的结果是什么?

404

日志记录(可选)

No response

补充说明(可选)

No response

@honghuangdc
Copy link
Member Author

解决方案:在路由守卫那里判断当redirect参数转换后的路由名称匹配到VITE_ROUTE_HOME或者后端返回的home路由时,将参数redirect从路经里剔除

@honghuangdc honghuangdc added the bug Something isn't working label Jun 18, 2024
honghuangdc added a commit that referenced this issue Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant