mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
[fix] ensure path works on windows because path.join doesnt like URLs
This commit is contained in:
parent
d5c656bceb
commit
ed73f06ed3
@ -1,5 +1,4 @@
|
|||||||
var common = exports,
|
var common = exports,
|
||||||
path = require('path'),
|
|
||||||
url = require('url'),
|
url = require('url'),
|
||||||
extend = require('util')._extend;
|
extend = require('util')._extend;
|
||||||
|
|
||||||
@ -72,7 +71,9 @@ common.setupOutgoing = function(outgoing, options, req, forward) {
|
|||||||
? url.parse(req.url).path
|
? url.parse(req.url).path
|
||||||
: req.url;
|
: req.url;
|
||||||
|
|
||||||
outgoing.path = path.join(targetPath, outgoingPath);
|
outgoing.path = targetPath
|
||||||
|
? targetPath + '/' + outgoingPath
|
||||||
|
: outgoingPath;
|
||||||
|
|
||||||
return outgoing;
|
return outgoing;
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user