title: How can I establish a secure connection to a websocket on localhost?
body: <p>We have an application which we run on a POS terminal, that should receive data from an application running on the same machine, while displaying content from a remote site which is loaded over HTTPS.</p>
  
  <p>To receive the data from the local application, we want to use websockets, which is working fine so far. However, when the site we're displaying is loaded over HTTPS, the websocket connection is required to be encrypted as well.</p>
  
  <p>Because we can't really get a proper certificate for <code>localhost</code>, we're just using a self-signed one. But Chrome won't connect to a websocket that uses a self-signed certificate.</p>
  
  <p>How can we resolve this problem? We can't use an unencrypted websocket, we can't use a self-signed certificate for the encrypted one and we can't get a signed certificate for <code>localhost</code>. What option am I missing?</p>