You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nutch.apache.org by ta...@apache.org on 2023/08/28 14:29:58 UTC
[nutch] branch master updated: NUTCH-2989 -- ElasticIndexWriter should enable auth for https, too
This is an automated email from the ASF dual-hosted git repository.
tallison pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nutch.git
The following commit(s) were added to refs/heads/master by this push:
new 5a223e172 NUTCH-2989 -- ElasticIndexWriter should enable auth for https, too
new f5cd0d633 Merge pull request #768 from tballison/NUTCH-2989
5a223e172 is described below
commit 5a223e172298eb83e8b0f6880364b4746ba760e5
Author: tballison <ta...@apache.org>
AuthorDate: Mon Aug 28 10:05:44 2023 -0400
NUTCH-2989 -- ElasticIndexWriter should enable auth for https, too
---
.../java/org/apache/nutch/indexwriter/elastic/ElasticIndexWriter.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/plugin/indexer-elastic/src/java/org/apache/nutch/indexwriter/elastic/ElasticIndexWriter.java b/src/plugin/indexer-elastic/src/java/org/apache/nutch/indexwriter/elastic/ElasticIndexWriter.java
index 053bfd68a..290d9dfca 100644
--- a/src/plugin/indexer-elastic/src/java/org/apache/nutch/indexwriter/elastic/ElasticIndexWriter.java
+++ b/src/plugin/indexer-elastic/src/java/org/apache/nutch/indexwriter/elastic/ElasticIndexWriter.java
@@ -210,6 +210,9 @@ public class ElasticIndexWriter implements IndexWriter {
restClientBuilder.setHttpClientConfigCallback(new HttpClientConfigCallback() {
@Override
public HttpAsyncClientBuilder customizeHttpClient(HttpAsyncClientBuilder httpClientBuilder) {
+ if (auth) {
+ httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider);
+ }
// ignore issues with self-signed certificates
httpClientBuilder.setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE);
return httpClientBuilder.setSSLContext(sslContext);