mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
pass gun's options to websocket
I recently had to set options given to the websocket client especially rejectUnauthorized {Boolean} Verify or not the server certificate. for connecting to wss which are using self signed certs... could also pass things like 'protocol' to differentiate a Gun websocket connection from some other websocket connection.... I don't know if maybe websock options should be a object in options instead ? To avoid namespace collision?
This commit is contained in:
parent
2e7b87c3b9
commit
e8f840c548
@ -134,7 +134,7 @@ API.connect = function () {
|
||||
var url = this.url;
|
||||
|
||||
// Open a new websocket.
|
||||
var socket = new WebSocket(url);
|
||||
var socket = new WebSocket(url, this.options);
|
||||
|
||||
// Re-use the previous listeners.
|
||||
socket._events = this._events;
|
||||
|
Loading…
x
Reference in New Issue
Block a user