修改BUG:注销登录连接支持跨站点重定向

This commit is contained in:
Argo-MacBookPro 2018-10-29 14:33:07 +08:00
parent c4195adb6b
commit f3a77f2671
1 changed files with 3 additions and 2 deletions

View File

@ -23,7 +23,8 @@ namespace Bootstrap.Client.Models
UserName = user.UserName;
SettingsUrl = DictHelper.RetrieveSettingsUrl();
ProfilesUrl = DictHelper.RetrieveProfilesUrl();
var uriBuilder = new UriBuilder(ConfigurationManager.AppSettings["AuthHost"]) { Path = CookieAuthenticationDefaults.LogoutPath };
var uriBuilder = new UriBuilder(ConfigurationManager.AppSettings["AuthHost"]);
uriBuilder.Path = uriBuilder.Path == "/" ? CookieAuthenticationDefaults.LogoutPath.Value : uriBuilder.Path + CookieAuthenticationDefaults.LogoutPath;
LogoutUrl = uriBuilder.ToString();
if (!string.IsNullOrEmpty(user.Css)) Theme = user.Css;
}
@ -50,6 +51,6 @@ namespace Bootstrap.Client.Models
/// <summary>
/// 获得 退出登录地址
/// </summary>
public string LogoutUrl { get; set; }
public string LogoutUrl { get; }
}
}