Skip to content

Commit 2f93d5d

Browse files
committed
sendData and ifOrigin instead of data and origin keys
1 parent 2022aab commit 2f93d5d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ To register your app, add `<your-app-name>.json` containing the necessary detail
99
The JSON should contain the following keys, some of which are optional. Most take string-typed values.
1010

1111
- `app` : Name of the app
12-
- `origin` : Optional. If provided, Securelay creates a web-push only if the triggering request matches this in its [Origin](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Origin) header.
1312
- `webPush` : Specify the web-push notification
13+
- `ifOrigin` : Optional. Comma-separated list if multiple origins. If provided, Securelay creates a web-push only if the triggering request matches one of the listed origins in its [Origin](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Origin) header.
14+
- `sendData` : Optional. Boolean. If provided and `true`, Securelay adds the triggering request's body to the web-push as [additional data](https://documentation.onesignal.com/reference/push-notification#custom-data--categories).
1415
- `title` : Notification header
1516
- `url` : Clicking the notification would open this link
1617
- `icon` : URL to app logo or icon
1718
- `message` : Message to be shown in the notification body
18-
- `data` : Optional. Boolean. If provided and `true`, Securelay adds the triggering request's body to the web-push as additional data.
1919

2020
See [formonit.json](./formonit.json) as an example.

formonit.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"app": "Formonit",
33
"webPush": {
4+
"sendData": false,
45
"title": "Formonit",
56
"url": "https://formonit.github.io",
67
"icon": "https://formonit.github.io/android-chrome-192x192.png",
7-
"message": "You've a new message. Tap to open.",
8-
"data": false
8+
"message": "You've a new message. Tap to open."
99
}
1010
}

0 commit comments

Comments
 (0)