(options)
| 88 | httpProxy.createRightProxy = createRightProxy; |
| 89 | |
| 90 | function 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 | |
| 112 | require('util').inherits(ProxyServer, EE3); |
| 113 |
nothing calls this directly
no test coverage detected