title: Spring Cloud Gateway Not Forwarding Requests To HTTPS When Using Eureka Load Balancer
body: <p>I am working with microservices routing with <code>Spring Cloud Gateway</code> and registered in <code>Eureka Server</code>.</p>
  <p>The microservices are running in multiple instances that's why I need to use Load Balancer in the gateway as below</p>
  <pre><code>spring:
    application:
      name: GATEWAY-NAME
    cloud:
      gateway:
        httpclient:
          wiretap: true
        httpserver:
          wiretap: true
        routes:
          - id: MICROSERVICE-NAME
            uri: lb://MICROSERVICE-NAME
            predicates:
              - Path=/path/**
  </code></pre>
  <p>This is working fine when the microservices are running on HTTP protocol without SSL. But when I enable SSL in the microservice servers, the upper configuration doesn't work. Rather it works when I use the URL directly instead of load balancer as below.</p>
  <pre><code>spring:
    application:
      name: GATEWAY-NAME
    cloud:
      gateway:
        httpclient:
          wiretap: true
        httpserver:
          wiretap: true
        routes:
          - id: MICROSERVICE-NAME
            uri: https://domain:port
            predicates:
              - Path=/path/**
  </code></pre>
  <p>Now I need to use the load balancer when SSL is enabled in the servers where microservices are running. I also tried <code>uri: lbs://MICROSERVICE-NAME</code> but didn't get any result.</p>
  <p>How can I achieve my goal? Please let me know what should I do to redirect to HTTPS using the load balancer from gateway route.</p>