File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,6 +107,21 @@ describe('--host', function () {
107107 } ) ;
108108
109109 it ( 'should disallow localhost calls when bound to specific host' , async function ( ) {
110+ // Add diagnostic logging to understand the environment
111+ const dns = require ( 'node:dns' ) . promises ;
112+ console . log ( '\n=== Diagnostic Info ===' ) ;
113+ console . log ( `Hostname: ${ hostname } ` ) ;
114+
115+ try {
116+ const resolved = await dns . lookup ( hostname ) ;
117+ console . log ( `Hostname resolves to: ${ resolved . address } (family: ${ resolved . family } )` ) ;
118+ console . log ( `Hostname is localhost: ${ resolved . address === '127.0.0.1' || resolved . address === '::1' } ` ) ;
119+ }
120+ catch ( error ) {
121+ console . log ( `Hostname does not resolve: ${ error . code } ` ) ;
122+ }
123+ console . log ( '======================\n' ) ;
124+
110125 await mb . start ( [ '--host' , hostname ] ) ;
111126
112127 try {
You can’t perform that action at this time.
0 commit comments