diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/LoggedOut.cshtml.cs b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/LoggedOut.cshtml.cs index aca5e2a02c..efa1a7a618 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/LoggedOut.cshtml.cs +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/LoggedOut.cshtml.cs @@ -1,5 +1,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; +using NUglify.Helpers; namespace Volo.Abp.Account.Web.Pages.Account; @@ -19,17 +20,26 @@ public class LoggedOutModel : AccountPageModel public virtual Task OnGetAsync() { - PostLogoutRedirectUri = GetRedirectUrl(PostLogoutRedirectUri); - SignOutIframeUrl = GetRedirectUrl(SignOutIframeUrl); - + NormalizeUrl(); return Task.FromResult(Page()); } public virtual Task OnPostAsync() { - PostLogoutRedirectUri = GetRedirectUrl(PostLogoutRedirectUri); - SignOutIframeUrl = GetRedirectUrl(SignOutIframeUrl); - + NormalizeUrl(); return Task.FromResult(Page()); } + + protected virtual void NormalizeUrl() + { + if (!PostLogoutRedirectUri.IsNullOrWhiteSpace()) + { + PostLogoutRedirectUri = Url.Content(GetRedirectUrl(PostLogoutRedirectUri)); + } + + if(!SignOutIframeUrl.IsNullOrWhiteSpace()) + { + SignOutIframeUrl = Url.Content(GetRedirectUrl(SignOutIframeUrl)); + } + } }