Javascript create WebSocket connection refused - content security
Trying to open a WebSocket connection from a Browser to a server running on localhost:9000 here is my JS code: $( document ).ready(function() { var url = "ws://localhost:9000/myapp"; var connection = new WebSocket(url); connection.onopen = function() { console.log('WebSocket Open'); }; connection.onerror = function(error) { console.log('WebSocket Error ', error); }; connection.onmessage = function(event) { console.log('WebSocket Msg ', event); } }); But the browser is refusing to accept the connection due to Content-security policy: Content Security Policy: The page's settings blocked the