mirror of
https://github.com/anjoy8/Blog.Core.git
synced 2024-09-20 23:48:27 +08:00
59 lines
1.4 KiB
JSON
59 lines
1.4 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",
|
|
"ServiceDiscoveryProvider": {
|
|
"Host": "localhost",
|
|
"Port": 8500,
|
|
"Type": "Consul"
|
|
}
|
|
}
|
|
} |