diff options
author | Bjørn Christian Seime <bjorncs@yahooinc.com> | 2023-07-12 16:13:27 +0200 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@yahooinc.com> | 2023-07-12 16:45:46 +0200 |
commit | 34adcbec812c4994ba5fe0b14e441613f473d99a (patch) | |
tree | 1fd842bcf6fcdf35228a76a787bedac93af93f0b /vespa-feed-client | |
parent | 97f0cf32edba5e6545dc027cdcdaaec125bad37d (diff) |
Use correct uri
Diffstat (limited to 'vespa-feed-client')
-rw-r--r-- | vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/JettyCluster.java | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/JettyCluster.java b/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/JettyCluster.java index 30dc1ab0d07..431a42d7fbf 100644 --- a/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/JettyCluster.java +++ b/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/JettyCluster.java @@ -181,15 +181,12 @@ class JettyCluster implements Cluster { Map<String, Supplier<String>> proxyHeaders = new TreeMap<>(); b.requestHeaders.forEach((k, v) -> { if (isProxyHeader(k)) proxyHeaders.put(k, v); }); if (!proxyHeaders.isEmpty()) { - for (URI endpoint : b.endpoints) { - httpClient.getAuthenticationStore().addAuthenticationResult(new Authentication.Result() { - @Override public URI getURI() { return URI.create(endpointUri(endpoint)); } - @Override public void apply(Request r) { - r.headers(hs -> proxyHeaders.forEach((k, v) -> hs.add(k, v.get()))); - } - }); - - } + httpClient.getAuthenticationStore().addAuthenticationResult(new Authentication.Result() { + @Override public URI getURI() { return URI.create(endpointUri(b.proxy)); } + @Override public void apply(Request r) { + r.headers(hs -> proxyHeaders.forEach((k, v) -> hs.add(k, v.get()))); + } + }); } } |