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 =
158158 'required encryption keys' ) ) ;
159159 }
160160
161- try {
162161 const encrypted = encryptionHelper . encrypt (
163162 subscription . keys . p256dh , subscription . keys . auth , payload ) ;
164163
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 ) ;
170169
171170 requestPayload = encrypted . cipherText ;
172171 } else {
You can’t perform that action at this time.
0 commit comments