Skip to content

Commit

Permalink
[es-browser] override default 9200 port (elastic#33523)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbudz committed Mar 20, 2019
1 parent 7b83ea1 commit 5c6f594
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/legacy/ui/public/chrome/api/angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ export function initAngularApi(chrome, internals) {
.value('esUrl', (function () {
const a = document.createElement('a');
a.href = chrome.addBasePath('/elasticsearch');
const protocolPort = /https/.test(a.protocol) ? 443 : 80;
const port = a.port || protocolPort;
return {
host: a.hostname,
port: a.port,
port,
protocol: a.protocol,
pathname: a.pathname
};
Expand Down

0 comments on commit 5c6f594

Please sign in to comment.