Reputation: 2356
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 ?
Upvotes: 4
Views: 8894
Reputation: 5601
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}/
Upvotes: 0
Reputation: 2356
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.
Upvotes: 5
Reputation: 769
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}/
Upvotes: 2