We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents edaad09 + dfbd3c7 commit cfe7798Copy full SHA for cfe7798
src/web-push-lib.js
@@ -164,10 +164,8 @@ WebPushLib.prototype.sendNotification =
164
requestOptions.headers['Content-Length'] = encrypted.cipherText.length;
165
requestOptions.headers['Content-Type'] = 'application/octet-stream';
166
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);
+ requestOptions.headers.Encryption = 'salt=' + encrypted.salt;
+ requestOptions.headers['Crypto-Key'] = 'dh=' + urlBase64.encode(encrypted.localPublicKey);
171
172
requestPayload = encrypted.cipherText;
173
} catch (err) {
0 commit comments