Damien Arrachequesne
2021-01-14 01:05:16 +01:00
parent 2bd444ae9f
commit d134feeaa6
2 changed files with 9 additions and 2 deletions

View File

@@ -67,7 +67,12 @@ class WS extends Transport {
"ca",
"ciphers",
"rejectUnauthorized",
"localAddress"
"localAddress",
"protocolVersion",
"origin",
"maxPayload",
"family",
"checkServerIdentity"
);
if (this.opts.extraHeaders) {

View File

@@ -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;
}, {});
};