Establish a DDP connection over SSL in the Meteor app
1 answer
Meteor relays on SockJs, according to the SocksJs README :From SockJS' point of view there is nothing special about SSL/HTTPS. Connecting between unencrypted and encrypted sites should work just fine.
My code:
var connection = DDP.connect("ws://127.0.0.1:3000");
If you switch from ws
to wss
(WebSocket Secure) if the host supports ssl it will be used. On my localhost, I don't install ssl or drop the "ws", you have to manually code it if you want.
0
source to share