|
|
|
@ -1,5 +1,6 @@ |
|
|
|
using EShopOnAbp.BasketService; |
|
|
|
using EShopOnAbp.CatalogService; |
|
|
|
using EShopOnAbp.CmskitService; |
|
|
|
using EShopOnAbp.Localization; |
|
|
|
using EShopOnAbp.OrderingService; |
|
|
|
using EShopOnAbp.PaymentService; |
|
|
|
@ -10,18 +11,18 @@ using EShopOnAbp.PublicWeb.Menus; |
|
|
|
using EShopOnAbp.PublicWeb.PaymentMethods; |
|
|
|
using EShopOnAbp.Shared.Hosting.AspNetCore; |
|
|
|
using Microsoft.AspNetCore.Authentication; |
|
|
|
using Microsoft.AspNetCore.Authentication.OpenIdConnect; |
|
|
|
using Microsoft.AspNetCore.Builder; |
|
|
|
using Microsoft.AspNetCore.DataProtection; |
|
|
|
using Microsoft.AspNetCore.HttpOverrides; |
|
|
|
using Microsoft.Extensions.Configuration; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Microsoft.Extensions.Hosting; |
|
|
|
using Microsoft.IdentityModel.Protocols.OpenIdConnect; |
|
|
|
using Polly; |
|
|
|
using StackExchange.Redis; |
|
|
|
using System; |
|
|
|
using System.Net.Http.Headers; |
|
|
|
using Microsoft.AspNetCore.Authentication.OpenIdConnect; |
|
|
|
using Microsoft.AspNetCore.HttpOverrides; |
|
|
|
using Polly; |
|
|
|
using Volo.Abp; |
|
|
|
using Volo.Abp.Account; |
|
|
|
using Volo.Abp.AspNetCore.Authentication.OpenIdConnect; |
|
|
|
@ -61,6 +62,7 @@ namespace EShopOnAbp.PublicWeb; |
|
|
|
typeof(CatalogServiceHttpApiClientModule), |
|
|
|
typeof(BasketServiceContractsModule), |
|
|
|
typeof(OrderingServiceHttpApiClientModule), |
|
|
|
typeof(CmskitServiceHttpApiClientModule), |
|
|
|
typeof(AbpAspNetCoreSignalRModule), |
|
|
|
typeof(PaymentServiceHttpApiClientModule), |
|
|
|
typeof(AbpAutoMapperModule) |
|
|
|
@ -76,7 +78,7 @@ public class EShopOnAbpPublicWebModule : AbpModule |
|
|
|
typeof(EShopOnAbpPublicWebModule).Assembly |
|
|
|
); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
PreConfigure<AbpHttpClientBuilderOptions>(options => |
|
|
|
{ |
|
|
|
options.ProxyClientBuildActions.Add((remoteServiceName, clientBuilder) => |
|
|
|
@ -150,6 +152,7 @@ public class EShopOnAbpPublicWebModule : AbpModule |
|
|
|
options.Scope.Add("CatalogService"); |
|
|
|
options.Scope.Add("PaymentService"); |
|
|
|
options.Scope.Add("OrderingService"); |
|
|
|
options.Scope.Add("CmskitService"); |
|
|
|
}); |
|
|
|
if (Convert.ToBoolean(configuration["AuthServer:IsOnProd"])) |
|
|
|
{ |
|
|
|
@ -263,7 +266,7 @@ public class EShopOnAbpPublicWebModule : AbpModule |
|
|
|
{ |
|
|
|
app.UseErrorPage(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
app.UseForwardedHeaders(new ForwardedHeadersOptions |
|
|
|
{ |
|
|
|
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto |
|
|
|
|