websocket
websocket copied to clipboard
Addition of options to allow loading of custom certificates
Addition of an Options field of type map[string]interface{} to DialOptions which is used in the constructor for the js websocket instance and enables passing custom options like custom certificates.
After further investigation it seems like this is an option that is only available when using NodeJS as the javascript interpreter. This is the npm package in was using: https://www.npmjs.com/package/ws
The browser api for Websocket on the other hand does not allow for the use of custom certificates at all. That said though, when running this change with Vanillajs, there was no side effect except for lack of feedback saying that Options were ignored.
I think this is better solved by #373 then as you could override the transport and not use the browser API as the library assumes by default to pass whatever options you want.