Browse Source

updated web gateway with QoS and non-dev environment swagger config

pull/20/head
Galip Tolga Erdem 5 years ago
parent
commit
cf6aa5ff7a
  1. 4
      gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbpWebGatewayModule.cs
  2. 7
      gateways/web/src/EShopOnAbp.WebGateway/appsettings.json

4
gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbpWebGatewayModule.cs

@ -48,6 +48,10 @@ namespace EShopOnAbp.WebGateway
{
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"]);

7
gateways/web/src/EShopOnAbp.WebGateway/appsettings.json

@ -68,7 +68,12 @@
}
],
"UpstreamPathTemplate": "/api/abp/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ],
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 3,
"DurationOfBreak": 5000,
"TimeoutValue": 2500
}
},
{
"ServiceKey": "Administration Service",

Loading…
Cancel
Save