summaryrefslogtreecommitdiffstats
path: root/auth/auth-core/src/main
diff options
context:
space:
mode:
authorInstrumental <jcgmisc@stl.gathman.org>2018-04-06 14:59:36 -0500
committerInstrumental <jcgmisc@stl.gathman.org>2018-04-06 15:00:23 -0500
commit679f142a91b165a958b5739808d6409d6960b6f4 (patch)
treec8aa0834337d13b54307c462ae7182728176d065 /auth/auth-core/src/main
parent103d3ca78423b8c90be7ab3ce76c7144f31476d7 (diff)
Make cross-container access work
Issue-ID: AAF-218 Change-Id: Ib31646e3ce6e38c2ef0a02fe1d2f57cf963a5a4a Signed-off-by: Instrumental <jcgmisc@stl.gathman.org>
Diffstat (limited to 'auth/auth-core/src/main')
-rw-r--r--auth/auth-core/src/main/java/org/onap/aaf/auth/server/JettyServiceStarter.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/server/JettyServiceStarter.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/server/JettyServiceStarter.java
index dbf24cc6..912f4b93 100644
--- a/auth/auth-core/src/main/java/org/onap/aaf/auth/server/JettyServiceStarter.java
+++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/server/JettyServiceStarter.java
@@ -21,6 +21,7 @@
package org.onap.aaf.auth.server;
import java.io.IOException;
+import java.net.Inet4Address;
import java.net.InetAddress;
import java.util.Properties;
@@ -112,7 +113,10 @@ public class JettyServiceStarter<ENV extends RosettaEnv, TRANS extends Trans> ex
@Override
public void _start(RServlet<TRANS> rserv) throws Exception {
- final String hostname = access().getProperty(Config.HOSTNAME, "localhost");
+ String hostname = access().getProperty(Config.HOSTNAME, null);
+ if(hostname==null) {
+ hostname = Inet4Address.getLocalHost().getHostName();
+ }
final int port = Integer.parseInt(access().getProperty("port","0"));
final String keystore = access().getProperty(Config.CADI_KEYSTORE, null);
final int IDLE_TIMEOUT = Integer.parseInt(access().getProperty(Config.AAF_CONN_IDLE_TIMEOUT, Config.AAF_CONN_IDLE_TIMEOUT_DEF));