MCPcopy
hub / github.com/http-party/node-http-proxy / ProxyServer

Function ProxyServer

lib/http-proxy/index.js:90–110  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

88httpProxy.createRightProxy = createRightProxy;
89
90function ProxyServer(options) {
91 EE3.call(this);
92
93 options = options || {};
94 options.prependPath = options.prependPath === false ? false : true;
95
96 this.web = this.proxyRequest = createRightProxy('web')(options);
97 this.ws = this.proxyWebsocketRequest = createRightProxy('ws')(options);
98 this.options = options;
99
100 this.webPasses = Object.keys(web).map(function(pass) {
101 return web[pass];
102 });
103
104 this.wsPasses = Object.keys(ws).map(function(pass) {
105 return ws[pass];
106 });
107
108 this.on('error', this.onError, this);
109
110}
111
112require('util').inherits(ProxyServer, EE3);
113

Callers

nothing calls this directly

Calls 1

createRightProxyFunction · 0.85

Tested by

no test coverage detected