ensure body-parser middleware is further downstream than rewrite.. fixes #30.

This commit is contained in:
Lloyd Brookes
2016-02-20 16:11:12 +00:00
parent 49dc789850
commit f7ecc9f5fd
5 changed files with 94 additions and 58 deletions

View File

@ -50,6 +50,7 @@ function proxyRequest (route, app) {
proxy.once('proxyReq', function (proxyReq) {
proxyReq.path = url.parse(route.new).path
})
proxy.web(this.req, this.res, { target: route.new })
}
}