diff --git a/lib/transports/websocket.js b/lib/transports/websocket.js index 1c7ea92ad..39a6c9fef 100644 --- a/lib/transports/websocket.js +++ b/lib/transports/websocket.js @@ -67,7 +67,12 @@ class WS extends Transport { "ca", "ciphers", "rejectUnauthorized", - "localAddress" + "localAddress", + "protocolVersion", + "origin", + "maxPayload", + "family", + "checkServerIdentity" ); if (this.opts.extraHeaders) { diff --git a/lib/util.js b/lib/util.js index fc30f0828..61c00b560 100644 --- a/lib/util.js +++ b/lib/util.js @@ -1,6 +1,8 @@ module.exports.pick = (obj, ...attr) => { return attr.reduce((acc, k) => { - acc[k] = obj[k]; + if (obj.hasOwnProperty(k)) { + acc[k] = obj[k]; + } return acc; }, {}); };