0

I have developed a node js application which works fine as long as use http. Now I need to upgrade the code too be able to work ssl and I am having problems to load the socket.io-client/socket.io.js file. (The rest is working fine. I installed the certificates and the server works well)

Firefox fails with the following message: Blocked loading mixed active content "http://"url"/socket.io/?EIO=3&transport=polling&t=NX-uS5E". which is weird because the link states a http request.

Chrome fails with this message: socket.io.js:3511 Mixed Content: The page at 'https://"url"?' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://"url"/socket.io/?EIO=3&transport=polling&t=NX-s_OB'. This request has been blocked; the content must be served over HTTPS.

It seems that socket.io-client is trying to load a resource using http instead of https. Is that possible? How can I correct this? Any idea?

I have been searching the web for two days noow and I have not come to any indication of someone else having this issue

1 Answers1

1

Ok, after letting it go for the evening and having a good rest I checked my whole code again and found the error!

I had one obfuscated code line where I was using a http request instead of a https one. I had to correct this on both, the server and the client side.

I also had to include the port number on each of the calls and force the socket on the client side to use polling instead of websockets by adding the option "transports: ['polling']"