diff --git a/lib/http-proxy.js b/lib/http-proxy.js index 24efb46..9620b70 100644 --- a/lib/http-proxy.js +++ b/lib/http-proxy.js @@ -20,24 +20,23 @@ var http = require('http'), */ proxy.createProxyServer = proxy.createServer = function createProxyServer(options) { - if(!options) { - throw new Error([ - "`options` is needed and it must have the following layout:", - " ", - " { ", - " target : ", - " forward: ", - " agent : ", - " ssl : ", - " ws : ", - " xfwd : ", - " } ", - " ", - "NOTE: `options.ws` and `options.ssl` are optional. ", - " `options.target and `options.forward` cannot be ", - " both missing " - ].join("\n")); - } + /* + * `options` is needed and it must have the following layout: + * + * { + * target : + * forward: + * agent : + * ssl : + * ws : + * xfwd : + * } + * + * NOTE: `options.ws` and `options.ssl` are optional. + * `options.target and `options.forward` cannot be + * both missing + * } + */ return new httpProxy.Server(options); };