From c676fe91d80a565dbcdcdcc1d32700c7a2674948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=88o=20Martiniak?= Date: Fri, 4 Oct 2024 15:41:39 +0200 Subject: [PATCH] Update src/MMLib.SwaggerForOcelot/ServiceDiscovery/SwaggerServiceDiscoveryProvider.cs --- .../ServiceDiscovery/SwaggerServiceDiscoveryProvider.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/MMLib.SwaggerForOcelot/ServiceDiscovery/SwaggerServiceDiscoveryProvider.cs b/src/MMLib.SwaggerForOcelot/ServiceDiscovery/SwaggerServiceDiscoveryProvider.cs index 5056fa4..2769c73 100644 --- a/src/MMLib.SwaggerForOcelot/ServiceDiscovery/SwaggerServiceDiscoveryProvider.cs +++ b/src/MMLib.SwaggerForOcelot/ServiceDiscovery/SwaggerServiceDiscoveryProvider.cs @@ -108,6 +108,9 @@ private async Task GetSwaggerUri(SwaggerEndPointConfig endPoint, RouteOptio var builder = new UriBuilder(GetScheme(service, route), service.DownstreamHost, service.DownstreamPort); if (builder.Scheme.IsNullOrEmpty()) + { + builder.Scheme = conf?.Scheme ?? "http"; + } builder.Scheme = conf?.Scheme ?? "http"; if (endPoint.Service.Path.IsNullOrEmpty())