|
|
@ -33,14 +33,6 @@ function proxyRequest (route, app) { |
|
|
|
.replace(re, arguments[index + 1] || '') |
|
|
|
}) |
|
|
|
|
|
|
|
/* test no keys remain in the new path */ |
|
|
|
keys.length = 0 |
|
|
|
pathToRegexp(url.parse(route.new).path, keys) |
|
|
|
if (keys.length) { |
|
|
|
this.throw(500, `[PROXY] Invalid target URL: ${route.new}`) |
|
|
|
return next() |
|
|
|
} |
|
|
|
|
|
|
|
this.response = false |
|
|
|
debug('proxy request', `from: ${this.path}, to: ${url.parse(route.new).href}`) |
|
|
|
|
|
|
|