diff --git a/ds-wms-service/DS.WMS.Gateway/ocelot.json b/ds-wms-service/DS.WMS.Gateway/ocelot.json index 13061e31..e3c294c8 100644 --- a/ds-wms-service/DS.WMS.Gateway/ocelot.json +++ b/ds-wms-service/DS.WMS.Gateway/ocelot.json @@ -1,72 +1,139 @@ { //这里注意,以前是ReRoutes现在是Routes - "Routes": [ - { - "DownstreamPathTemplate": "/WmsMainAPI/swagger.json", - "DownstreamScheme": "http", - "DownstreamHostAndPorts": [ + "Routes": [ { - "Host": "localhost", - "Port": 3000 - } - ], - "UpstreamPathTemplate": "/WmsMainAPI/swagger.json", - "UpstreamHttpMethod": [ - "Get", - "Post" - ] - }, - { - "DownstreamPathTemplate": "/mainApi/{url}", - "DownstreamScheme": "http", - "DownstreamHostAndPorts": [ + "DownstreamPathTemplate": "/WmsMainAPI/swagger.json", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "localhost", + "Port": 3000 + } + ], + "UpstreamPathTemplate": "/WmsMainAPI/swagger.json", + "UpstreamHttpMethod": [ + "Get", + "Post" + ] + }, { - "Host": "localhost", - "Port": 3000 - } - ], - "UpstreamPathTemplate": "/mainApi/{url}", - "UpstreamHttpMethod": [ - "Get", - "Post" - ], - "LoadBalancerOptions": { - "Type": "RoundRobin" - } - },{ - "DownstreamPathTemplate": "/WmsAdminAPI/swagger.json", - "DownstreamScheme": "http", - "DownstreamHostAndPorts": [ + "DownstreamPathTemplate": "/mainApi/{url}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "localhost", + "Port": 3000 + } + ], + "UpstreamPathTemplate": "/mainApi/{url}", + "UpstreamHttpMethod": [ + "Get", + "Post" + ], + "LoadBalancerOptions": { + "Type": "RoundRobin" + } + }, { - "Host": "localhost", - "Port": 3001 - } - ], - "UpstreamPathTemplate": "/WmsAdminAPI/swagger.json", - "UpstreamHttpMethod": [ - "Get", - "Post" - ] - }, - { - "DownstreamPathTemplate": "/adminApi/{url}", - "DownstreamScheme": "http", - "DownstreamHostAndPorts": [ + "DownstreamPathTemplate": "/WmsAdminAPI/swagger.json", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "localhost", + "Port": 3001 + } + ], + "UpstreamPathTemplate": "/WmsAdminAPI/swagger.json", + "UpstreamHttpMethod": [ + "Get", + "Post" + ] + }, + { + "DownstreamPathTemplate": "/adminApi/{url}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "localhost", + "Port": 3001 + } + ], + "UpstreamPathTemplate": "/adminApi/{url}", + "UpstreamHttpMethod": [ + "Get", + "Post" + ], + "LoadBalancerOptions": { + "Type": "RoundRobin" + } + }, { - "Host": "localhost", - "Port": 3001 + "DownstreamPathTemplate": "/WmsOpAPI/swagger.json", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "localhost", + "Port": 3002 + } + ], + "UpstreamPathTemplate": "/WmsOpAPI/swagger.json", + "UpstreamHttpMethod": [ + "Get", + "Post" + ] + }, + { + "DownstreamPathTemplate": "/opApi/{url}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "localhost", + "Port": 3002 + } + ], + "UpstreamPathTemplate": "/opApi/{url}", + "UpstreamHttpMethod": [ + "Get", + "Post" + ], + "LoadBalancerOptions": { + "Type": "RoundRobin" + } + }, + { + "DownstreamPathTemplate": "/WmsFeeAPI/swagger.json", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "localhost", + "Port": 3003 + } + ], + "UpstreamPathTemplate": "/WmsFeeAPI/swagger.json", + "UpstreamHttpMethod": [ + "Get", + "Post" + ] + }, + { + "DownstreamPathTemplate": "/feeApi/{url}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "localhost", + "Port": 3003 + } + ], + "UpstreamPathTemplate": "/feeApi/{url}", + "UpstreamHttpMethod": [ + "Get", + "Post" + ], + "LoadBalancerOptions": { + "Type": "RoundRobin" + } } - ], - "UpstreamPathTemplate": "/adminApi/{url}", - "UpstreamHttpMethod": [ - "Get", - "Post" - ], - "LoadBalancerOptions": { - "Type": "RoundRobin" - } - } - ], + ], "GlobalConfiguration": { "BaseUrl": "http://localhost:3008", "RateLimitOptions": {