How to solve or bypass error websocket: origin not allowed
<p>On my server I'm running gorilla web socket in go and I'm trying to connect from phonegap application with following javascript code:</p>

<pre><code>var conn = new WebSocket("ws://IP:8080/ws");
</code></pre>

<p>but I'm getting this error: <strong>websocket: origin not allowed</strong> on my server.</p>

<p>Is there anything I can do to solve this?</p>

<p>Maybe another phonegap library or fix/update for this kind of connection?</p>

<p>I have tried many examples of phonegap script but non of them worked.</p>

<p>I would like to use that gorilla websocket plugin on my server but as things stand now that is not possible.
Thank you</p>