We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7cc3e2a commit 0cbb9fbCopy full SHA for 0cbb9fb
1 file changed
src/drivers/connection-ws.ts
@@ -30,7 +30,7 @@ export class SQLiteCloudWebsocketConnection extends SQLiteCloudConnection {
30
if (!this.socket) {
31
this.config = config
32
const connectionString = this.config.connectionString as string
33
- const gatewayUrl = this.config?.gatewayUrl || `ws://${this.config.host as string}:4000`
+ const gatewayUrl = this.config?.gatewayUrl || `${this.config.host === 'localhost' ? 'ws' : 'wss'}://${this.config.host as string}:4000`
34
this.socket = io(gatewayUrl, { auth: { token: connectionString } })
35
}
36
callback?.call(this, null)
0 commit comments