From 4351ed1c86c8336b3a2d9f80098dcb2c9180685d Mon Sep 17 00:00:00 2001 From: yawnt Date: Thu, 16 Jan 2014 15:03:44 +0100 Subject: [PATCH] [fix] closes #547 --- lib/http-proxy.js | 7 +++++++ lib/http-proxy/index.js | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/http-proxy.js b/lib/http-proxy.js index 196dded..34029e8 100644 --- a/lib/http-proxy.js +++ b/lib/http-proxy.js @@ -8,6 +8,13 @@ var http = require('http'), */ module.exports = httpProxy.Server; +module.exports.createProxy = function(options) { + return { + web: httpProxy.createRightProxy('web')(options), + ws: httpProxy.createRightProxy('ws')(options) + }; +} + /** * Creates the proxy server. * diff --git a/lib/http-proxy/index.js b/lib/http-proxy/index.js index bd8b8a9..95bc287 100644 --- a/lib/http-proxy/index.js +++ b/lib/http-proxy/index.js @@ -80,7 +80,7 @@ function createRightProxy(type) { }; }; } - +httpProxy.createRightProxy = createRightProxy; function ProxyServer(options) { EE3.call(this);