diff --git a/Bootstrap.Client/Models/HeaderBarModel.cs b/Bootstrap.Client/Models/HeaderBarModel.cs index c7608954..17fb3dec 100644 --- a/Bootstrap.Client/Models/HeaderBarModel.cs +++ b/Bootstrap.Client/Models/HeaderBarModel.cs @@ -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 /// /// 获得 退出登录地址 /// - public string LogoutUrl { get; set; } + public string LogoutUrl { get; } } } \ No newline at end of file