Try to guess whether a ribbon client is looking for HTTPS
There are usually some hints available, especially if the Server
came from Eureka. Unfortunately Server on it's own doesn't contain
enough information (why?), but as a fallback we can guess that
anyone using port 443 is secure.
Fixes gh-459
@ -108,6 +108,16 @@ information will have a secure health check URL. Because of the way
@@ -108,6 +108,16 @@ information will have a secure health check URL. Because of the way
Eureka works internally, it will still publish a non-secure URL for
status and home page unless you also override those explicitly.
NOTE: If your app is running behind a proxy, and the SSL termination
is in the proxy (e.g. if you run in Cloud Foundry or other platforms
as a service) then you will need to ensure that the proxy "forwarded"
headers are intercepted and handled by the application. An embedded
Tomcat container in a Spring Boot app does this automatically for most
proxies (since 1.3.0), but other containers might need explicit
configuration for the 'X-Forwarded-\*` headers. A sign that you got
this wrong will be that the links rendered by your app to itslef will be
wrong (the wrong host, port or protocol).
=== Eureka's Health Checks
By default, Eureka uses the client heartbeat to determine if a client is up.
@ -53,9 +56,9 @@ public class RibbonLoadBalancerClient implements LoadBalancerClient {
@@ -53,9 +56,9 @@ public class RibbonLoadBalancerClient implements LoadBalancerClient {
@ -67,7 +70,8 @@ public class RibbonLoadBalancerClient implements LoadBalancerClient {
@@ -67,7 +70,8 @@ public class RibbonLoadBalancerClient implements LoadBalancerClient {
@ -76,7 +80,8 @@ public class RibbonLoadBalancerClient implements LoadBalancerClient {
@@ -76,7 +80,8 @@ public class RibbonLoadBalancerClient implements LoadBalancerClient {
@ -93,20 +98,30 @@ public class RibbonLoadBalancerClient implements LoadBalancerClient {
@@ -93,20 +98,30 @@ public class RibbonLoadBalancerClient implements LoadBalancerClient {
@ -117,7 +132,7 @@ public class RibbonLoadBalancerClient implements LoadBalancerClient {
@@ -117,7 +132,7 @@ public class RibbonLoadBalancerClient implements LoadBalancerClient {
if(loadBalancer==null){
returnnull;
}
returnloadBalancer.chooseServer("default");//TODO: better handling of key
returnloadBalancer.chooseServer("default");//TODO: better handling of key
@ -128,7 +143,7 @@ public class RibbonLoadBalancerClient implements LoadBalancerClient {
@@ -128,7 +143,7 @@ public class RibbonLoadBalancerClient implements LoadBalancerClient {