mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
[minor] Dont use .bind()
This commit is contained in:
parent
daf9231a66
commit
340be42797
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user