2

I am running a chat application on my website and everything was working fine when I was on HTTP but as soon as I got the SSL added and started using HTTPS, I get this errors for my websocket connection:

[blocked] The page at 'https://localhost/test/' was loaded over HTTPS, but ran insecure content from 'ws://localhost:815/': this content should also be loaded over HTTPS.
 websocket.js:10

Uncaught SecurityError: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.

I tried changing ws to wss and that just remove these error but that chat is still not working.

I am using Godaddy as my host/server provider. Do I need to update the SSL certificate to tell it to approve the wss connection somehow?

OGcode
  • 31
  • 6
  • "Why do I get a connection issue when using ssl?" - you have a configuration problem. What is the URL to the server so we can look at things? – jww Jul 25 '14 at 04:51
  • In my websoket.js file I have this.connection = new WebSocket('wss://localhost:815/'); – OGcode Jul 25 '14 at 17:04

1 Answers1

0

maybe in your html file there is a link to scripts that include http and not https

example: <script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>

should be: <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>