We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8eb5e1 commit cc0b9b8Copy full SHA for cc0b9b8
src/Ocelot/DownstreamRouteFinder/Middleware/DownstreamRouteFinderMiddleware.cs
@@ -27,7 +27,10 @@ public async Task Invoke(HttpContext httpContext)
27
28
var upstreamQueryString = httpContext.Request.QueryString.ToString();
29
30
- var upstreamHost = httpContext.Request.Headers["Host"];
+ var hostHeader = httpContext.Request.Headers["Host"].ToString();
31
+ var upstreamHost = hostHeader.Contains(':')
32
+ ? hostHeader.Split(':')[0]
33
+ : hostHeader;
34
35
Logger.LogDebug($"Upstream url path is {upstreamUrlPath}");
36
0 commit comments