HTTP proxy correctly handle subpaths.

This commit is contained in:
Julien Fontanet 2015-05-19 12:55:35 +02:00
parent e4486f4c17
commit 1f98d7e5ec

View File

@ -150,9 +150,9 @@ const setUpProxies = (connect, opts) => {
}
// HTTP request proxy.
forEach(opts, (config, url) => {
forEach(opts, (target, url) => {
connect.use(url, (req, res) => {
proxyRequest(config, req, res)
proxyRequest(target + req.url, req, res)
})
})