I was trying to make a connection to a server running at http://localhost:3008 serving sock-js communication but it failed to connect,
switching to http://127.0.0.1:3008 made it work.
I believe it is due to: 'urlUtils.isLoopbackAddr(parsedUrl.host)' not accepting 'localhost' as a loopback address so it fails to connect from any HTTPS website.
I was trying to make a connection to a server running at http://localhost:3008 serving sock-js communication but it failed to connect, switching to http://127.0.0.1:3008 made it work. I believe it is due to: 'urlUtils.isLoopbackAddr(parsedUrl.host)' not accepting 'localhost' as a loopback address so it fails to connect from any HTTPS website.
before this commit, https://github.com/sockjs/sockjs-client/commit/a57c910001e937d784c7bfcdcb05cfbbbc625934 it failed also for 127.0.0.1 but now '// exception is 127.0.0.0/8 and ::1 urls' which doesn't include localhost.