Explorar o código

quit using url.auth

utsushiiro %!s(int64=6) %!d(string=hai) anos
pai
achega
eab62073c7
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/server/service/search-delegator/elasticsearch.js

+ 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}`;
       }
     }