Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eureka registration of Https micro services

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 ?

like image 620
Upul Doluweera Avatar asked Oct 26 '25 09:10

Upul Doluweera


1 Answers

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.

like image 123
Upul Doluweera Avatar answered Oct 28 '25 23:10

Upul Doluweera