Skip to content

Commit 1a47e17

Browse files
committed
support port
1 parent 12040a3 commit 1a47e17

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

lib/api.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,12 @@ function ddvRestFulApi (path, requests, response) {
7272
}
7373
delete this.sendData
7474
}
75-
auth.setHeaders('Host', auth.host)
75+
var host = auth.host
76+
77+
if (auth.port) {
78+
host += ':' + auth.port
79+
}
80+
auth.setHeaders('Host', host)
7681
// 开始清除请求中多余的参数
7782
for (key in auth.query) {
7883
if ((!auth.query[key]) && auth.query[key] !== '' && auth.query[key] !== 0) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"webpack-node-externals": "^1.5.4"
5050
},
5151
"dependencies": {
52-
"ddv-auth": "~0.0.10",
52+
"ddv-auth": "~0.0.11",
5353
"crypto-js": "~3.1.9-1"
5454
}
5555
}

0 commit comments

Comments
 (0)