@@ -20,24 +20,23 @@ var http = require('http'),
20
20
*/
21
21
22
22
proxy . createProxyServer = proxy . createServer = function createProxyServer ( options ) {
23
- if ( ! options ) {
24
- throw new Error ( [
25
- "`options` is needed and it must have the following layout:" ,
26
- " " ,
27
- " { " ,
28
- " target : <url string to be parsed with the url module> " ,
29
- " forward: <url string to be parsed with the url module> " ,
30
- " agent : <object to be passed to http(s).request> " ,
31
- " ssl : <object to be passed to https.createServer()> " ,
32
- " ws : <true/false, if you want to proxy websockets> " ,
33
- " xfwd : <true/false, adds x-forward headers> " ,
34
- " } " ,
35
- " " ,
36
- "NOTE: `options.ws` and `options.ssl` are optional. " ,
37
- " `options.target and `options.forward` cannot be " ,
38
- " both missing "
39
- ] . join ( "\n" ) ) ;
40
- }
23
+ /*
24
+ * `options` is needed and it must have the following layout:
25
+ *
26
+ * {
27
+ * target : <url string to be parsed with the url module>
28
+ * forward: <url string to be parsed with the url module>
29
+ * agent : <object to be passed to http(s).request>
30
+ * ssl : <object to be passed to https.createServer()>
31
+ * ws : <true/false, if you want to proxy websockets>
32
+ * xfwd : <true/false, adds x-forward headers>
33
+ * }
34
+ *
35
+ * NOTE: `options.ws` and `options.ssl` are optional.
36
+ * `options.target and `options.forward` cannot be
37
+ * both missing
38
+ * }
39
+ */
41
40
42
41
return new httpProxy . Server ( options ) ;
43
42
} ;
0 commit comments