@ -95,6 +95,19 @@ These links show up in the metadata that is consumed by clients, and
@@ -95,6 +95,19 @@ These links show up in the metadata that is consumed by clients, and
used in some scenarios to decide whether to send requests to your
application, so it's helpful if they are accurate.
=== Registering a Secure Application
If your app wants to be contacted over HTTPS you can set two flags in
@ -48,6 +52,9 @@ public class DiscoveryClientConfigServiceBootstrapConfiguration {
@@ -48,6 +52,9 @@ public class DiscoveryClientConfigServiceBootstrapConfiguration {
@Autowired
privateConfigClientPropertiesconfig;
@Autowired
privateDiscoveryClientclient;
@Autowired
privateEurekaClienteurekaClient;
@ -63,7 +70,7 @@ public class DiscoveryClientConfigServiceBootstrapConfiguration {
@@ -63,7 +70,7 @@ public class DiscoveryClientConfigServiceBootstrapConfiguration {
@ -85,4 +92,13 @@ public class DiscoveryClientConfigServiceBootstrapConfiguration {
@@ -85,4 +92,13 @@ public class DiscoveryClientConfigServiceBootstrapConfiguration {
@ -113,8 +112,8 @@ public class EurekaDiscoveryClient implements DiscoveryClient {
@@ -113,8 +112,8 @@ public class EurekaDiscoveryClient implements DiscoveryClient {
@Override
publicintgetPort(){
// assume if unsecure is enabled, that is the default
// assume if secure is enabled, that is the default
if(!this.instance.isPortEnabled(SECURE)){
returnthis.instance.getPort();
}
returnthis.instance.getSecurePort();
@ -122,8 +121,8 @@ public class EurekaDiscoveryClient implements DiscoveryClient {
@@ -122,8 +121,8 @@ public class EurekaDiscoveryClient implements DiscoveryClient {
@Override
publicbooleanisSecure(){
// assume if unsecure is enabled, that is the default
@ -75,6 +78,23 @@ public class DiscoveryClientConfigServiceBootstrapConfigurationTests {
@@ -75,6 +78,23 @@ public class DiscoveryClientConfigServiceBootstrapConfigurationTests {