title: How to force non secure connection via paho mqqt js client?
body: <p>I get this error in staging but not in development when the browser tries to connect to my mosquitto server in Firefox:</p>
  
  <blockquote>
    <p>SecurityError: The operation is insecure.</p>
  </blockquote>
  
  <p>I'm not running the system with ssl and I know I should fix this but for the time been I would like to make this work.</p>
  
  <pre><code>  function mqtt() {
      // Create a client instance
      client = new Paho.MQTT.Client('localhost', 9091, "", "tablet_1");
      // set callback handlers
      client.onConnectionLost = onConnectionLost;
      client.onMessageArrived = onMessageArrived;
      client.reconnect = true
      willMessage = new Paho.MQTT.Message("Rescue me");
      connectOptions = {
          userName: 'server',
          password: '1234',
          // willMessage: willMessage,
          onSuccess:onConnect,
          cleanSession: true,
          reconnect: true,
          useSSL: false
      }
      // connect the client
      client.connect(connectOptions);
    }
  </code></pre>
  
  <p>This are my port configurations in mosquitto:</p>
  
  <pre><code>listener 1883
  listener 8883
  cafile ca.crt
  certfile server.crt
  keyfile server.key
  tls_version tlsv1.2
  
  listener 9091
  protocol websockets
  </code></pre>