Przeglądaj źródła

Merge pull request #1424 from utsushiiro/fix-es-config-bug

Elasticsearch Clientに渡すhttpAuthの作成方法を修正
Yuki Takei 6 lat temu
rodzic
commit
a19e0d6953

+ 2 - 2
src/server/service/search-delegator/elasticsearch.js

@@ -91,8 +91,8 @@ class ElasticsearchDelegator {
       host = `${url.protocol}//${url.host}`;
       indexName = url.pathname.substring(1); // omit heading slash
 
-      if (url.auth != null) {
-        httpAuth = url.auth;
+      if (url.username != null && url.password != null) {
+        httpAuth = `${url.username}:${url.password}`;
       }
     }