title: Socket Connection to node server from https gives mixed content error
body: <p>I have a website running on https and as part of new feature I created a nodejs+socket.io based conversation server. </p>
  
  <p>I decided to host conversation server on separate AWS instance. 
  When I try to make socket connection from my main website (running on https) to conversation server (running on AWS static IP instance like <a href="http://123.123.45.56" rel="nofollow noreferrer">http://123.123.45.56</a>) then it does not establish socket connection properly and browser shows following error logged to console: </p>
  
  <pre><code>Mixed Content: The page at 'https://www.mydomain' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://123.123.45.56/socket.io/?payload=asdfkasdla'. This request has been blocked; the content must be served over HTTPS.
  </code></pre>
  
  <p>This is how I make the connection node server: </p>
  
  <pre><code>io.connect(chatServerURL,{query: "payload=" + encryptedPayload,secure: false});
  </code></pre>
  
  <p>On conversation server I am routing all the traffic coming on port 80 with the route /socket.io to locally node server port and server as follows: </p>
  
  <pre><code>  RewriteEngine On
    RewriteCond %{REQUEST_URI}  ^/socket.io            [NC]
    RewriteCond %{QUERY_STRING} transport=websocket    [NC]
    RewriteRule /(.*)           ws://localhost:3000/$1 [P,L]
  
    ProxyPass / http://localhost:3000/
    ProxyPassReverse / http://localhost:3000/
  </code></pre>
  
  <p>What should I do to make it work?
  I don't have domain to use just for chat server and then assign ssl to that domain. I know that should not be the way to make it work. </p>
  
  <p>What is the solution to it?</p>