File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ const convertedVapidKey = urlBase64ToUint8Array(vapidPublicKey);
8585
8686registration .pushManager .subscribe ({
8787 userVisibleOnly: true ,
88- applicationServerKey: convertedVapidKey
88+ applicationServerKey: convertedVapidKey
8989});
9090```
9191
@@ -129,7 +129,10 @@ const options = {
129129 publicKey: ' < URL Safe Base64 Encoded Public Key >' ,
130130 privateKey: ' < URL Safe Base64 Encoded Private Key >'
131131 },
132- TTL : < Number >
132+ TTL : < Number > ,
133+ headers: {
134+ ' < header name >' : ' < header value >'
135+ }
133136}
134137
135138webpush .sendNotification (
@@ -175,6 +178,7 @@ request only. This overrides any API key set via `setGCMAPIKey()`.
175178* privateKey* values defined. These values should follow the [ VAPID Spec] ( https://tools.ietf.org/html/draft-thomson-webpush-vapid ) .
176179- ** TTL** is a value in seconds that describes how long a push message is
177180retained by the push service (by default, four weeks);
181+ - ** headers** is an object with all the extra headers you want to add to the request.
178182
179183### Returns
180184
You can’t perform that action at this time.
0 commit comments