Potential fix for crash

This commit is contained in:
Matthew Bryant (mandatory)
2020-05-01 13:33:59 -07:00
parent 6889e6462b
commit 31c112b877
+5 -6
View File
@@ -282,16 +282,15 @@ function getUserReqHandler(userRule, recorder) {
var remote_port_key = req.socket.remotePort;
var proxy_authentication_header = false;
// Automatically clean up the entry from the table once the
// socket is properly terminated.
req.socket.on('close', () => {
delete global.proxyAuthPassthru[req.socket.remotePort];
});
//console.log(`Source port for HTTPS connecting to us: ${req.socket.remotePort}`);
if(global.proxyAuthPassthru && remote_port_key in global.proxyAuthPassthru) {
proxy_authentication_header = global.proxyAuthPassthru[remote_port_key]['proxy_authorization'];
// Automatically clean up the entry from the table once the
// socket is properly terminated.
req.socket.on('close', () => {
delete global.proxyAuthPassthru[remote_port_key];
});
}
if(proxy_authentication_header) {