Skip to content

Commit c5085b1

Browse files
committed
only use port if specified
1 parent 2339eff commit c5085b1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/request-api.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,11 @@ function requestAPI (config, path, args, qs, files, buffer, cb) {
109109

110110
qs['stream-channels'] = true
111111

112+
const port = config.port ? `:${config.port}` : ''
113+
112114
const opts = {
113115
method: files ? 'POST' : 'GET',
114-
uri: `http://${config.host}:${config.port}${config['api-path']}${path}`,
116+
uri: `http://${config.host}${port}${config['api-path']}${path}`,
115117
qs: qs,
116118
useQuerystring: true,
117119
headers: {},

0 commit comments

Comments
 (0)