Would be great if you could pass in an options.exclude so you can proxy everything except an url or path. Maybe allow a string, array or regular expression.
For now, I've worked around this with the following hack:
var proxyMiddleware = proxy({
host: proxyHost
});
app.use(function* (next) {
// Do not route anything related to this word
if (this.path.indexOf(excludedWord) !== -1) {
return;
}
yield* proxyMiddleware.call(this, next);
});
Would be great if you could pass in an
options.exclude
so you can proxy everything except an url or path. Maybe allow a string, array or regular expression.For now, I've worked around this with the following hack: