diff --git a/lib/http-proxy/common.js b/lib/http-proxy/common.js index 670a0e3..05ed6e1 100644 --- a/lib/http-proxy/common.js +++ b/lib/http-proxy/common.js @@ -1,5 +1,4 @@ var common = exports, - path = require('path'), url = require('url'), extend = require('util')._extend; @@ -72,7 +71,9 @@ common.setupOutgoing = function(outgoing, options, req, forward) { ? url.parse(req.url).path : req.url; - outgoing.path = path.join(targetPath, outgoingPath); + outgoing.path = targetPath + ? targetPath + '/' + outgoingPath + : outgoingPath; return outgoing; };