Skip to content

Commit ed73f06

Browse files
committed
[fix] ensure path works on windows because path.join doesnt like URLs
1 parent d5c656b commit ed73f06

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/http-proxy/common.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
var common = exports,
2-
path = require('path'),
32
url = require('url'),
43
extend = require('util')._extend;
54

@@ -72,7 +71,9 @@ common.setupOutgoing = function(outgoing, options, req, forward) {
7271
? url.parse(req.url).path
7372
: req.url;
7473

75-
outgoing.path = path.join(targetPath, outgoingPath);
74+
outgoing.path = targetPath
75+
? targetPath + '/' + outgoingPath
76+
: outgoingPath;
7677

7778
return outgoing;
7879
};

0 commit comments

Comments
 (0)