Browse Source

Merge pull request #646 from colinin/Fix-missing-gateway-route

fix: Fix the missing gateway route
pull/649/head
yx lin 3 years ago
committed by GitHub
parent
commit
a32a86ba7f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/Ocelot/Multiplexer/AbpResponseMergeAggregator.cs
  2. 9
      gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/ocelot.Development.json

10
gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/Ocelot/Multiplexer/AbpResponseMergeAggregator.cs

@ -89,6 +89,16 @@ namespace Ocelot.Multiplexer
responseObject.Merge(contentObject, mergeSetting);
}
}
if (responseObject == null)
{
return new DownstreamResponse(
null,
HttpStatusCode.NotFound,
new List<KeyValuePair<string, IEnumerable<string>>>(),
"Not Found");
}
var stringContent = new StringContent(responseObject.ToString())
{
Headers = { ContentType = new MediaTypeHeaderValue("application/json") }

9
gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/ocelot.Development.json

@ -2034,8 +2034,7 @@
"wechat-setting-global",
"tencent-cloud-setting-global",
"aliyun-setting-global",
"oss-management-setting-global",
"invoice-setting-global"
"oss-management-setting-global"
],
"UpstreamPathTemplate": "/api/setting-management/settings/by-global",
"Aggregator": "AbpResponseMergeAggregator",
@ -2047,8 +2046,7 @@
"wechat-setting-current-tenant",
"tencent-cloud-setting-current-tenant",
"aliyun-setting-current-tenant",
"oss-management-setting-current-tenant",
"invoice-setting-current-tenant"
"oss-management-setting-current-tenant"
],
"UpstreamPathTemplate": "/api/setting-management/settings/by-current-tenant",
"Aggregator": "AbpResponseMergeAggregator",
@ -2056,8 +2054,7 @@
},
{
"RouteKeys": [
"setting-current-user",
"manufacture-setting-current-user"
"setting-current-user"
],
"UpstreamPathTemplate": "/api/setting-management/settings/by-current-user",
"Aggregator": "AbpResponseMergeAggregator",

Loading…
Cancel
Save