Commit 340be427 authored by indexzero's avatar indexzero

[minor] Dont use `.bind()`

parent daf9231a
......@@ -103,11 +103,11 @@ exports.createServer = function () {
proxy = new HttpProxy(options);
handler = callback
? function (req, res) { callback(req, res, proxy) }
: proxy.proxyRequest;
: function (req, res) { proxy.proxyRequest(req, res) };
server = options.https
? https.createServer(options.https, handler.bind(proxy))
: http.createServer(handler.bind(proxy));
? https.createServer(options.https, handler)
: http.createServer(handler);
//server.on('close', function () {
// proxy.close();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment