3

Eureka does not recognized HTTPS endpoints like '/info' and '/health' and always points to HTTP endpoints after enabling HTTPS. How to enable HTTPS micro-service url registration at Eureka ?

Upul Doluweera
  • 2,146
  • 1
  • 23
  • 28

3 Answers3

4

You have to explicitly define these URLs as Eureka always points to HTTP internally. Read Here for more about it.

You can add following into your yaml file in the microservice.

eureka:
   instance: 
      nonSecurePortEnabled: false
      securePortEnabled: true
      statusPageUrl: 'https://${eureka.instance.hostName}:${server.port}/info'
      healthCheckUrl: 'https://${eureka.instance.hostName}:${server.port}/health'
      homePageUrl: 'https://${eureka.instance.hostName}:${server.port}/'

Here "eureka.instance.hostName" and "server.port" values will be taken from the environment.

SAMUEL
  • 8,098
  • 3
  • 42
  • 42
Upul Doluweera
  • 2,146
  • 1
  • 23
  • 28
2

For me this configuration works:

eureka:
  instance:
    nonSecurePortEnabled: false
    securePortEnabled: true
    securePort: ${server.port}
    statusPageUrl: https://${eureka.instance.hostname}:${eureka.instance.securePort}/info
    homePageUrl: https://${eureka.instance.hostname}:${eureka.instance.securePort}/
althor
  • 739
  • 2
  • 9
  • 21
0

For me below configuration works fine:-

eureka:
   instance:
     statusPageUrl: https://${eureka.hostname}:${server.port}/actuator/info
     healthCheckUrl: https://${eureka.hostname}:${server.port}/health
     homePageUrl: https://${eureka.hostname}:${server.port}/
Abhijit Pritam Dutta
  • 5,521
  • 2
  • 11
  • 17