Ocelot 路由模板名称解释

模板 https://ocelot.readthedocs.io/en/latest/features/configuration.html

https://zhuanlan.zhihu.com/p/584291049

{
          "DownstreamPathTemplate": "/", -- 下游 URL 路径模板,也就是网关需要转发的目标应用的URL
 "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 },

"UseServiceDiscovery": false,--服务发现配置
         "DangerousAcceptAnyServerCertificateValidator": false -- 是否忽略SSL警告/错误 ,true- 是 }
posted @ 2022-11-30 17:15  细品人生  阅读(95)  评论(0编辑  收藏  举报