I'm wondering what's the proper (or any for that matter) way of setting up Laravel Echo on an https production server. I've had it working on my local vagrant for a little bit now, and now that I've pushed the changes to production I'm unable to get the script to connect to the node server. Here is what I currently have.
var echo = require('laravel-echo-server');
var options = {
host: 'https://localhost',
port: '6001',
sslCertPath: '/etc/nginx/ssl/nginx.crt',
sslKeyPath: '/etc/nginx/ssl/nginx.key'
};
echo.run(options);
And then in javascript
import Echo from "laravel-echo"
window.echo = new Echo({
broadcaster: 'socket.io',
host: 'https://localhost:6001'
});
The above configuration is how I started out, but I've tried many other combinations, including trying to edit the nginx configuration to bypass https all together. If bypassing https is the method that's required, any advice on how to do this with Laravel Echo would be appreciated since the socket.io threads on this topic that I've been referencing don't seem to do the trick for me.