aboutsummaryrefslogtreecommitdiffstats
path: root/configserver-client
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2021-04-26 16:53:44 +0200
committerJon Marius Venstad <venstad@gmail.com>2021-04-26 16:53:44 +0200
commit3474ca9d4079e9ef9a9039d04a33d67fcb8715d2 (patch)
tree0be63a522ef012be001db3d387b9f7d70f207854 /configserver-client
parentde80724b756e8f3e617755e838189948b8d835cc (diff)
Allow localhost
Diffstat (limited to 'configserver-client')
-rw-r--r--configserver-client/src/main/java/ai/vespa/hosted/client/HttpConfigServerClient.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/configserver-client/src/main/java/ai/vespa/hosted/client/HttpConfigServerClient.java b/configserver-client/src/main/java/ai/vespa/hosted/client/HttpConfigServerClient.java
index e00489f0c64..0fae2e734d8 100644
--- a/configserver-client/src/main/java/ai/vespa/hosted/client/HttpConfigServerClient.java
+++ b/configserver-client/src/main/java/ai/vespa/hosted/client/HttpConfigServerClient.java
@@ -13,6 +13,8 @@ import org.apache.hc.core5.http.io.SocketConfig;
import org.apache.hc.core5.util.TimeValue;
import org.apache.hc.core5.util.Timeout;
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.SSLSession;
import java.io.IOException;
import java.util.Collection;
import java.util.Set;
@@ -50,7 +52,11 @@ public class HttpConfigServerClient extends AbstractConfigServerClient {
manager.setValidateAfterInactivity(TimeValue.ofSeconds(10));
return manager;
},
- new AthenzIdentityVerifier(Set.copyOf(serverIdentities)),
+ new AthenzIdentityVerifier(Set.copyOf(serverIdentities)) {
+ @Override public boolean verify(String hostname, SSLSession session) {
+ return super.verify(hostname, session) || "localhost".equals(hostname);
+ }
+ },
false)
.disableAutomaticRetries()
.setUserAgent(userAgent)