Blog.Core/Blog.Core.Gateway/ocelot.Development.json

54 lines
1.3 KiB
JSON

{
"Routes": [
// blog-svc
{
"UpstreamPathTemplate": "/svc/blog/{url}",
"UpstreamHttpMethod": [ "Get", "Post", "Put", "Delete" ],
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"DownstreamPathTemplate": "/svc/blog/{url}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 9291
}
],
"AddHeadersToRequest": {
"user-phone": "Claims[user-phone] > value",
"gw-sign": "Claims[gw-sign] > value"
},
"UpstreamHeaderTransform": {
"custom-key": "blog.gateway"
},
"DownstreamHeaderTransform": {
"trace-id": "Trace-Id"
},
"AuthenticationOptions": {
"AuthenticationProviderKey": "GW"
},
"DelegatingHandlers": [
"CustomResultHandler"
]
},
// blog-svc-swagger
{
"UpstreamPathTemplate": "/swagger/apiswg/blog-svc/swagger.json",
"UpstreamHttpMethod": [ "GET" ],
"DownstreamPathTemplate": "/swagger/V2/swagger.json",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 9291
}
],
"LoadBalancer": "RoundRobin"
}
],
"GlobalConfiguration": {
"BaseUrl": "http://localhost:9000"
}
}