hocuspocus icon indicating copy to clipboard operation
hocuspocus copied to clipboard

SSL / TLS

Open codenamegary opened this issue 1 year ago • 7 comments

The problem I am facing I have this up and running and it works great! I'm facing challenges when serving up something over SSL, and then trying to connect to wss:// in production. Browsers throw mixed content errors and it doesn't work.

The solution I would like

const server = Server.configure({
  port: 3333,
  address: address(),
  async onConnect(data) {
    console.log(Date.now() + ' connected!')
  },
  extensions: [
    new SQLite({
      database: 'db.sqlite',
    })
  ],
  // New stuff here
  ssl: {
    cert: "/path/to/certificate.pem",
    keyPath: "/path/to/key.pem"
  }
})

And essentially just follow along the ws example from there.

Alternatives I have considered I have tried every AWS load balancer config and an nginx proxy but nothing seems to work.

Additional context I think I have a handle on how this could work, happy to put together a pull request if it's desireable.

codenamegary avatar Aug 04 '23 06:08 codenamegary