File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -158,15 +158,14 @@ WebPushLib.prototype.generateRequestDetails =
158
158
'required encryption keys' ) ) ;
159
159
}
160
160
161
- try {
162
161
const encrypted = encryptionHelper . encrypt (
163
162
subscription . keys . p256dh , subscription . keys . auth , payload ) ;
164
163
165
- requestOptions . headers [ 'Content-Length' ] = encrypted . cipherText . length ;
166
- requestOptions . headers [ 'Content-Type' ] = 'application/octet-stream' ;
167
- requestOptions . headers [ 'Content-Encoding' ] = 'aesgcm' ;
168
- requestOptions . headers . Encryption = 'salt=' + encrypted . salt ;
169
- requestOptions . headers [ 'Crypto-Key' ] = 'dh=' + urlBase64 . encode ( encrypted . localPublicKey ) ;
164
+ requestDetails . headers [ 'Content-Length' ] = encrypted . cipherText . length ;
165
+ requestDetails . headers [ 'Content-Type' ] = 'application/octet-stream' ;
166
+ requestDetails . headers [ 'Content-Encoding' ] = 'aesgcm' ;
167
+ requestDetails . headers . Encryption = 'salt=' + encrypted . salt ;
168
+ requestDetails . headers [ 'Crypto-Key' ] = 'dh=' + urlBase64 . encode ( encrypted . localPublicKey ) ;
170
169
171
170
requestPayload = encrypted . cipherText ;
172
171
} else {
You can’t perform that action at this time.
0 commit comments