Skip to content

Commit

Permalink
feat: add missing ws options
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne committed Jan 14, 2021
1 parent 2bd444a commit d134fee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion lib/transports/websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ class WS extends Transport {
"ca",
"ciphers",
"rejectUnauthorized",
"localAddress"
"localAddress",
"protocolVersion",
"origin",
"maxPayload",
"family",
"checkServerIdentity"
);

if (this.opts.extraHeaders) {
Expand Down
4 changes: 3 additions & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
@@ -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;
}, {});
};

0 comments on commit d134fee

Please sign in to comment.