模板 https://ocelot.readthedocs.io/en/latest/features/configuration.html
{ "DownstreamPathTemplate": "/", -- 下游 URL 路径模板,也就是网关需要转发的目标应用的URL标签:false,--,URL,路由,Ocelot,true,模板 From: https://www.cnblogs.com/ganqiyin/p/16939120.html
"Priority": 1,-- 优先级,0-优先级最低 "UpstreamPathTemplate": "/", -- 上游 URL 路径模板,也就是网关配置的URL "UpstreamHttpMethod": [ -- 上游 URL 方法访问方式 "Get" ],
"UpstreamHost":"xxx.com",--指定上游访问域名,如果不是xxx.com 的将不会进行路由转发 "DownstreamHttpMethod": "",-- 下游 URL 方法访问方式 "DownstreamHttpVersion": "", -- 设置代理要用的 HTTP 版本(“1.0”, “1.1” or “2.0”) "AddHeadersToRequest": {}, "AddClaimsToRequest": {}, "RouteClaimsRequirement": {}, "AddQueriesToRequest": {}, "RequestIdKey": "", "FileCacheOptions": { "TtlSeconds": 0, "Region": "" }, "RouteIsCaseSensitive": false, -- 是否大小写敏感:true-是 "ServiceName": "", "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { "Host": "localhost", "Port": 51876, } ], "QoSOptions": { "ExceptionsAllowedBeforeBreaking": 0, "DurationOfBreak": 0, "TimeoutValue": 0 }, "LoadBalancer": "", "RateLimitOptions": { "ClientWhitelist": [], "EnableRateLimiting": false, "Period": "", "PeriodTimespan": 0, "Limit": 0 }, "AuthenticationOptions": { "AuthenticationProviderKey": "", "AllowedScopes": [] }, "HttpHandlerOptions": { "AllowAutoRedirect": true, "UseCookieContainer": true, "UseTracing": true, "MaxConnectionsPerServer": 100 }, "DangerousAcceptAnyServerCertificateValidator": false -- 是否忽略SSL警告/错误 ,true- 是 }