We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 63c53a1 commit 37036ddCopy full SHA for 37036dd
lib/http-proxy/index.js
@@ -64,7 +64,9 @@ function createRightProxy(type) {
64
options[e] = parse_url(options[e]);
65
});
66
67
- if(typeof this.emit === 'undefined' && !cbl) { throw new Error("You need to pass a callback to handle errors") }
+ if (!options.target && !options.forward) {
68
+ return this.emit('error', new Error('Must provide a proper URL as target'));
69
+ }
70
71
for(var i=0; i < passes.length; i++) {
72
/**
0 commit comments