From 4187791fe906c7b321c7d776285d9e7d87b02e5f Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 17 Nov 2020 14:51:06 +0800 Subject: [PATCH] Remove the slash at the end of the url. --- .../IdentityServer/IdentityServerDataSeedContributor.cs | 8 ++++---- .../IdentityServer/IdentityServerDataSeedContributor.cs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs index badfde46da..d738cb8217 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs @@ -159,7 +159,7 @@ namespace MyCompanyName.MyProjectName.IdentityServer redirectUri: $"{webClientRootUrl}signin-oidc", postLogoutRedirectUri: $"{webClientRootUrl}signout-callback-oidc", frontChannelLogoutUri: $"{webClientRootUrl}Account/FrontChannelLogout", - corsOrigins: new[] { webClientRootUrl } + corsOrigins: new[] { webClientRootUrl.RemovePostFix("/") } ); } @@ -177,7 +177,7 @@ namespace MyCompanyName.MyProjectName.IdentityServer requireClientSecret: false, redirectUri: webClientRootUrl, postLogoutRedirectUri: webClientRootUrl, - corsOrigins: new[] { webClientRootUrl } + corsOrigins: new[] { webClientRootUrl.RemovePostFix("/") } ); } @@ -195,7 +195,7 @@ namespace MyCompanyName.MyProjectName.IdentityServer requireClientSecret: false, redirectUri: $"{blazorRootUrl}/authentication/login-callback", postLogoutRedirectUri: $"{blazorRootUrl}/authentication/logout-callback", - corsOrigins: new[] { blazorRootUrl } + corsOrigins: new[] { blazorRootUrl.RemovePostFix("/") } ); } @@ -212,7 +212,7 @@ namespace MyCompanyName.MyProjectName.IdentityServer secret: configurationSection["MyProjectName_Swagger:ClientSecret"]?.Sha256(), requireClientSecret: false, redirectUri: $"{swaggerRootUrl}/swagger/oauth2-redirect.html", - corsOrigins: new[] { swaggerRootUrl } + corsOrigins: new[] { swaggerRootUrl.RemovePostFix("/") } ); } } diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs index badfde46da..d738cb8217 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs @@ -159,7 +159,7 @@ namespace MyCompanyName.MyProjectName.IdentityServer redirectUri: $"{webClientRootUrl}signin-oidc", postLogoutRedirectUri: $"{webClientRootUrl}signout-callback-oidc", frontChannelLogoutUri: $"{webClientRootUrl}Account/FrontChannelLogout", - corsOrigins: new[] { webClientRootUrl } + corsOrigins: new[] { webClientRootUrl.RemovePostFix("/") } ); } @@ -177,7 +177,7 @@ namespace MyCompanyName.MyProjectName.IdentityServer requireClientSecret: false, redirectUri: webClientRootUrl, postLogoutRedirectUri: webClientRootUrl, - corsOrigins: new[] { webClientRootUrl } + corsOrigins: new[] { webClientRootUrl.RemovePostFix("/") } ); } @@ -195,7 +195,7 @@ namespace MyCompanyName.MyProjectName.IdentityServer requireClientSecret: false, redirectUri: $"{blazorRootUrl}/authentication/login-callback", postLogoutRedirectUri: $"{blazorRootUrl}/authentication/logout-callback", - corsOrigins: new[] { blazorRootUrl } + corsOrigins: new[] { blazorRootUrl.RemovePostFix("/") } ); } @@ -212,7 +212,7 @@ namespace MyCompanyName.MyProjectName.IdentityServer secret: configurationSection["MyProjectName_Swagger:ClientSecret"]?.Sha256(), requireClientSecret: false, redirectUri: $"{swaggerRootUrl}/swagger/oauth2-redirect.html", - corsOrigins: new[] { swaggerRootUrl } + corsOrigins: new[] { swaggerRootUrl.RemovePostFix("/") } ); } }