From 287abee355201f6a3ae758d8dc8ec110b5abd46a Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Tue, 2 Nov 2021 17:19:07 +0300 Subject: [PATCH] updated web-public gateway with QoS and non-dev environment swagger config --- .../EShopOnAbpWebPublicGatewayModule.cs | 4 ++++ .../src/EShopOnAbp.WebPublicGateway/appsettings.json | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/EShopOnAbpWebPublicGatewayModule.cs b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/EShopOnAbpWebPublicGatewayModule.cs index cf71cce0..ec322373 100644 --- a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/EShopOnAbpWebPublicGatewayModule.cs +++ b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/EShopOnAbpWebPublicGatewayModule.cs @@ -45,6 +45,10 @@ namespace EShopOnAbp.WebPublicGateway { var url = $"{config.DownstreamScheme}://{config.DownstreamHostAndPorts.FirstOrDefault()?.Host}:{config.DownstreamHostAndPorts.FirstOrDefault()?.Port}"; + if (!env.IsDevelopment()) + { + url = $"https://{config.DownstreamHostAndPorts.FirstOrDefault()?.Host}"; + } options.SwaggerEndpoint($"{url}/swagger/v1/swagger.json", $"{config.ServiceKey} API"); options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]); diff --git a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.json b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.json index 312cbe61..fceda57f 100644 --- a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.json +++ b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/appsettings.json @@ -42,7 +42,12 @@ } ], "UpstreamPathTemplate": "/api/abp/{everything}", - "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] + "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ], + "QoSOptions": { + "ExceptionsAllowedBeforeBreaking": 3, + "DurationOfBreak": 3000, + "TimeoutValue": 2500 + } }, { "ServiceKey": "Catalog Service",