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())