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);
85
85
86
86
registration .pushManager .subscribe ({
87
87
userVisibleOnly: true ,
88
- applicationServerKey: convertedVapidKey
88
+ applicationServerKey: convertedVapidKey
89
89
});
90
90
```
91
91
@@ -129,7 +129,10 @@ const options = {
129
129
publicKey: ' < URL Safe Base64 Encoded Public Key >' ,
130
130
privateKey: ' < URL Safe Base64 Encoded Private Key >'
131
131
},
132
- TTL : < Number >
132
+ TTL : < Number > ,
133
+ headers: {
134
+ ' < header name >' : ' < header value >'
135
+ }
133
136
}
134
137
135
138
webpush .sendNotification (
@@ -175,6 +178,7 @@ request only. This overrides any API key set via `setGCMAPIKey()`.
175
178
* privateKey* values defined. These values should follow the [ VAPID Spec] ( https://tools.ietf.org/html/draft-thomson-webpush-vapid ) .
176
179
- ** TTL** is a value in seconds that describes how long a push message is
177
180
retained 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.
178
182
179
183
### Returns
180
184
You can’t perform that action at this time.
0 commit comments