Skip to content

Commit cfe7798

Browse files
authored
Merge pull request #240 from web-push-libs/remove_keyid
Remove unneeded keyid parameter.
2 parents edaad09 + dfbd3c7 commit cfe7798

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/web-push-lib.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,8 @@ WebPushLib.prototype.sendNotification =
164164
requestOptions.headers['Content-Length'] = encrypted.cipherText.length;
165165
requestOptions.headers['Content-Type'] = 'application/octet-stream';
166166
requestOptions.headers['Content-Encoding'] = 'aesgcm';
167-
requestOptions.headers.Encryption = 'keyid=p256dh;salt=' +
168-
encrypted.salt;
169-
requestOptions.headers['Crypto-Key'] = 'keyid=p256dh;dh=' +
170-
urlBase64.encode(encrypted.localPublicKey);
167+
requestOptions.headers.Encryption = 'salt=' + encrypted.salt;
168+
requestOptions.headers['Crypto-Key'] = 'dh=' + urlBase64.encode(encrypted.localPublicKey);
171169

172170
requestPayload = encrypted.cipherText;
173171
} catch (err) {

0 commit comments

Comments
 (0)