sockjs/sockjs-client

Connecting from an HTTPS website to a 'localhost' url doesn't work

TalaatHarb opened this issue · 0 comments

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, a57c910
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.