diff --git a/lib/router.js b/lib/router.js index 37107dbd..f28361c0 100644 --- a/lib/router.js +++ b/lib/router.js @@ -28,7 +28,7 @@ function getTargetFromProxyTable(req, table) { _.forIn(table, function(value, key) { if (containsPath(key)) { - if (hostAndPath.indexOf(key) > -1) { // match 'localhost:3000/api' + if (hostAndPath.indexOf(key) == 0 || path.indexOf(key) == 0) { // match 'localhost:3000/api' result = table[key]; logger.debug('[HPM] Router table match: "%s"', key); return false;