Skip to content

Commit 6fe5e5e

Browse files
authored
Specify where wiildcard characters can be used (#33)
1 parent 6bc4a8d commit 6fe5e5e

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

explainer.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,10 @@ To allow PWAs to handle URLs that are outside of their own scope, it is necessar
6767

6868
### Manifest Changes
6969

70-
| Field | Required / Optional | Description | Type | Default |
71-
| :---------- | :------------------ | :-------------------------------------------- | :------- | :------ |
72-
| `url_handlers` | Optional | Origins of URLs that the app wishes to handle | object[] | `[]` |
70+
| Field | Required / Optional | Description | Type | Default | Wildcard allowed |
71+
| :---------- | :------------------ | :-------------------------------------------- | :------- | :------ | :--------------- |
72+
| `url_handlers` | Optional | Origins of URLs that the app wishes to handle | object[] | `[]` | N/A |
73+
| `origin` | Required | Origin | string | N/A | At front of host |
7374

7475
We propose adding a new _optional_ member `url_handlers` to the manifest object of `object[]` type. Each object in `url_handlers` contains a `origin` string, which is a pattern for matching origins. These patterns are allowed to have a wildcard (*) prefix in order to include multiple sub-domains. URLs that match these origins could be handled by this web app.
7576

@@ -216,16 +217,16 @@ Example 2 shows that the origin `https://tenant.contoso.com` allows the PWAs wit
216217

217218
This file must contain valid JSON. The top-level structure is an object, with a member named `web_apps`. `web_apps` is an array of objects and each object represents an entry for a unique web app. Each object contains:
218219

219-
| Field | Required / Optional | Description | Type | Default |
220-
| :------------ | :------------------ | :------------------------------------------------------- | :----- | :------ |
221-
| `manifest` | Required | URL string of the web app manifest of the associated PWA | string | N/A |
222-
| `details` | Optional | Contains arrays of URL patterns | object | N/A |
220+
| Field | Required / Optional | Description | Type | Default | Wildcard allowed |
221+
| :------------ | :------------------ | :------------------------------------------------------- | :----- | :------ | :--------------- |
222+
| `manifest` | Required | URL string of the web app manifest of the associated PWA | string | N/A | No |
223+
| `details` | Optional | Contains arrays of URL patterns | object | N/A | N/A |
223224

224225
Each `details` object contains:
225-
| Field | Required / Optional | Description | Type | Default |
226-
| :-------------- | :------------------ | :------------------------------- | :------- | :------ |
227-
| `paths` | Optional | Array of allowed path strings | string[] | `[]` |
228-
| `exclude_paths` | Optional | Array of disallowed path strings | string[] | `[]` |
226+
| Field | Required / Optional | Description | Type | Default | Wildcard allowed |
227+
| :-------------- | :------------------ | :------------------------------- | :------- | :------ | :------------------------------ |
228+
| `paths` | Optional | Array of allowed path strings | string[] | `[]` | At front and back of each entry |
229+
| `exclude_paths` | Optional | Array of disallowed path strings | string[] | `[]` | At front and back of each entry |
229230

230231
#### File Location
231232

0 commit comments

Comments
 (0)