Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove wildcard from scope_extensions, make a specialized entry #89

Open
dmurph opened this issue Nov 3, 2023 · 2 comments
Open

Remove wildcard from scope_extensions, make a specialized entry #89

dmurph opened this issue Nov 3, 2023 · 2 comments
Assignees
Labels
scope-extensions https://github.com/WICG/manifest-incubations/blob/gh-pages/scope_extensions-explainer.md

Comments

@dmurph
Copy link
Collaborator

dmurph commented Nov 3, 2023

The wildcard is a little weird for an origin, and it's not a parseable URL. We would have to specialize the parser for it.

  {
    "id": "/",
    "name": "Example",
    "display": "standalone",
    "start_url": "/index.html",
    "scope_extensions": [
      {"origin": "https://example.com", "treat_as_registrable_domain": true },
     // but this could also parse OK too:
      {"origin": "https://www.example.com", "treat_as_registrable_domain": true },
      {"origin": "https://www.example.co.uk"},
    ]
  }

This would allow only the www.example.co.uk part of example.co.uk, but allow ANY subdomain of example.com, as we treat the origin as a registrable domain.

Also, the spec already has a definition of registrable domain / eTLD+1, so we can parse that correctly. And we should likely require inclusion the https of the origin.

@dmurph
Copy link
Collaborator Author

dmurph commented Nov 3, 2023

@LuHuangMSFT

@LuHuangMSFT LuHuangMSFT self-assigned this Nov 3, 2023
@LuHuangMSFT LuHuangMSFT added the scope-extensions https://github.com/WICG/manifest-incubations/blob/gh-pages/scope_extensions-explainer.md label Nov 3, 2023
@alancutter
Copy link
Collaborator

I'm in favour of this change. We should stick with standard URL parsing if possible as there are likely edge cases this simplified form fails to handle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope-extensions https://github.com/WICG/manifest-incubations/blob/gh-pages/scope_extensions-explainer.md
Projects
None yet
Development

No branches or pull requests

3 participants