File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -282,16 +282,15 @@ function getUserReqHandler(userRule, recorder) {
282282 var remote_port_key = req . socket . remotePort ;
283283 var proxy_authentication_header = false ;
284284
285- // Automatically clean up the entry from the table once the
286- // socket is properly terminated.
287- req . socket . on ( 'close' , ( ) => {
288- delete global . proxyAuthPassthru [ req . socket . remotePort ] ;
289- } ) ;
290-
291285 //console.log(`Source port for HTTPS connecting to us: ${req.socket.remotePort}`);
292286
293287 if ( global . proxyAuthPassthru && remote_port_key in global . proxyAuthPassthru ) {
294288 proxy_authentication_header = global . proxyAuthPassthru [ remote_port_key ] [ 'proxy_authorization' ] ;
289+ // Automatically clean up the entry from the table once the
290+ // socket is properly terminated.
291+ req . socket . on ( 'close' , ( ) => {
292+ delete global . proxyAuthPassthru [ remote_port_key ] ;
293+ } ) ;
295294 }
296295
297296 if ( proxy_authentication_header ) {
You can’t perform that action at this time.
0 commit comments