Просмотр исходного кода

modify host when using searchbox

Yuki Takei 6 лет назад
Родитель
Сommit
b5d44ec8ef
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/server/util/search.js

+ 1 - 1
src/server/util/search.js

@@ -78,7 +78,7 @@ SearchClient.prototype.initClient = function() {
   const url = new URL(this.esUri);
   const url = new URL(this.esUri);
   if (url.pathname !== '/') {
   if (url.pathname !== '/') {
     host = isSearchboxSsl
     host = isSearchboxSsl
-      ? `${url.protocol}//${url.hostname}:443` // use 443 when Searchbox
+      ? `${url.protocol}//${url.auth}${url.hostname}:443` // use 443 when Searchbox
       : `${url.protocol}//${url.host}`;
       : `${url.protocol}//${url.host}`;
 
 
     indexName = url.pathname.substring(1); // omit heading slash
     indexName = url.pathname.substring(1); // omit heading slash