I am trying to use websocket rails with angular and heroku. He works in development, but now in production. Here is the code of the server that publishes the event and the client that listens for it.
WebsocketRails[channel_name].trigger('new_message', @json)
var dispatcher = new WebSocketRails(window.location.host + "/websocket");
var channel = dispatcher.subscribe(channel_name);
channel.bind('new_message', function(data) {
$scope.$apply(function(){
cr.unread_messages += 1;
});
});
I use SSL in production. I already tried setup
force_ssl = false
in production.rb, but to no avail.
The error I am getting is:
WebSocket connection to 'wss://domain.com/websocket' failed: Error during WebSocket handshake: Unexpected response code: 503
source
share