dotnetcore / dotnetcore/WTM

当修改了Home/Index的路由地址,Login的Redirect地址错误

Open
#597 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
C#
Stars
4.3k
Forks
896
PR merge metrics
No merged PRs in 30d

Description

在登录只有Login的属性Redirect会重新设置跳转的Url

public string Redirect
{
get
{
var rv = _redirect;
if (string.IsNullOrEmpty(rv) == false)
{
if (rv.StartsWith("/#") == false)
{
rv = "/#" + rv;
}
if(rv.Split("#/").Length > 2)
{
int index = rv.LastIndexOf("#/");
rv = rv.Substring(0, index);
}
}
return rv;
}
set { _redirect = value; }
}

但是如果我给Home/Index Contrller设置了route之后,这一段代码就会有异常,他会跳转到 {host}/#{route}/ 的地址

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.