Unable to obtain IP normally and forced to use https #2228
China-xiaoFang
started this conversation in
Show and tell
Replies: 2 comments 6 replies
|
No, I take it back. When I set |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The following problems exist after using Ocelot.
DelegatingHandler..NET version: v8
Ocelot version: v23.4.2
Deployment environment: Windows Server 2022 Datacenter (21H2)
IIS version: 10.0
Deployment method: An api site is deployed through IIS, all traffic is forwarded to this site, and then through the reverse proxy, it is proxied to the gateway center, that is, the Ocelot service, and then forwarded to various downstream services through Ocelot.
web.configGet client IP extension method
OcelotDelegatingHandler.csocelot.json{ "Routes": [ { "Key": "Gejia.Gateway.Center.API", "UpstreamPathTemplate": "/wms-api/ws/{url}", "DownstreamPathTemplate": "/{url}", "DownstreamScheme": "ws", "DownstreamHostAndPorts": [ { "Host": "127.0.0.1", "Port": 38091 } ] }, { "Key": "Gejia.Gateway.Center.API", "UpstreamPathTemplate": "/wms-api/center/{url}", "DownstreamPathTemplate": "/{url}", "DownstreamHostAndPorts": [ { "Host": "127.0.0.1", "Port": 38091 } ] }, ], "GlobalConfiguration": { "BaseUrl": "http://127.0.0.1:38090", "Timeout": 30000, "UpstreamHttpMethod": [ "Get", "Post", "Put", "Delete" ], "DownstreamScheme": "http", "AddHeadersToResponse": { "Content-Type": [ "application/javascript", "text/css", "text/html", "text/html" ] } } }All reactions