-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: Service worker configuration #22
Comments
When it comes to UI, would be good to make something that looks good on mobile, so we have less work when we are ready to ship PWA (#21) |
w.r.t. a slack thread: https://ipshipyard.slack.com/archives/C046HDAHA13/p1708532852533929
would it be a dumb idea to allow hashers to be added via ESM CDN import on the service-worker config page? Users could add entries similar to how they do on codepen, except in the service-worker configuration page, using esm.sh or other esm providing CDN, and we would load them similar to how we do in ipld-explorer-components at https://github.com/ipfs/ipld-explorer-components/blob/master/src/lib/init-helia.ts#L36 and https://github.com/ipfs/ipld-explorer-components/blob/master/src/lib/hash-importer.ts#L16 It looks like dynamic import is not currently available: w3c/ServiceWorker#1585, but if it were, this could be really interesting. Regardless, we should have a discussion somewhere about how to decide which default hashers to support with our "blessed" deployment of the service-worker-gateway. Also, we should add some documentation around how users should be able to deploy their own with their own hashers. If we deployed this as a workbox plugin or ServiceWorker library, users could add hashers fairly easily without forking. |
@lidel @aschmahmann a the configuration page is mostly ready other than preferences on how/when we're rendering it: #24 (comment) |
The configuration page exists and is working well except for configuring dns resolvers. Do we want to add that in before calling this done? Also, there was recent talk with @lidel about adding in badbits toggling, but that may be handled by delegated router |
I think so. Another thing we're missing here is showing the default configuration on the page. |
I think we should show the default config too. |
I'm going to call this done and we can iterate on the config as necessary |
Consolidating information from a slack thread:
What config?
What should we be able to configure?
The configuration page at deployed-sw-gateway.example.com root should allow the user to
See
Modify
Potential solutions
Cookies
We shouldn't allow much control via a cookie because of the damage dApps on other subdomains could cause.
dApps could purposefully override trustless-gateways & other settings. See https://www.rfc-editor.org/rfc/rfc6265#section-8.6:
from @lidel
iFrame message passing
We should be able to do this since the configuration could be writable only from the root, and would be read-only from subdomains.
Tasks
The text was updated successfully, but these errors were encountered: