Skip to content

Commit baac047

Browse files
committed
Fix #843
1 parent bde19d6 commit baac047

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Connection.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,8 @@ class Connection {
191191
path: '',
192192
href: url.href,
193193
origin: url.origin,
194-
port: url.port,
194+
// https://github.com/elastic/elasticsearch-js/issues/843
195+
port: url.port !== '' ? url.port : undefined,
195196
headers: this.headers,
196197
auth: !!url.username === true || !!url.password === true
197198
? `${url.username}:${url.password}`

0 commit comments

Comments
 (0)