We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 810b69a commit 0723d13Copy full SHA for 0723d13
index.js
@@ -13,7 +13,10 @@ function matcher (url, dest) {
13
// storing them in an array - on each request, if the URL matches one that has
14
// a function stored for it, the function will be called.
15
return function (url) {
16
-
+ var m = r(url)
17
+ if (!m) {
18
+ return;
19
+ }
20
var path = url.slice(m[0].length);
21
console.log('proxy:', url, '->', dest);
22
return {url: path, dest: dest};
@@ -50,6 +53,6 @@ module.exports = function (urls) {
50
53
return proxy.proxyRequest(req, res, m.dest);
51
54
}
52
55
- next() //did not have a rule for this request. fall back to next middleware.
56
+ next() //if there wasno matching rule, fall back to next middleware.
57
58
0 commit comments