-
Notifications
You must be signed in to change notification settings - Fork 22
feat: add support for experimental provider query parameter #734
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
base: main
Are you sure you want to change the base?
feat: add support for experimental provider query parameter #734
Conversation
ffc1bbc
to
1d13e8a
Compare
1d13e8a
to
1dd35c5
Compare
876c874
to
5da2167
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need many of these changes here TBH, but I'm open to discussing..
Is there a reason we would want to allow people to disable an optional parameter they may not even be aware of?
<InputToggle | ||
className='e2e-config-page-input e2e-config-page-input-enableProviderQueryParameter' | ||
label='Enable Provider Query Parameter' | ||
description='Parse provider multiaddres available as query parameters in URI.' | ||
value={enableProviderQueryParameter} | ||
onChange={(value) => { setConfig('enableProviderQueryParameter', value) }} | ||
resetKey={resetKey} | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if we need to toggle this on or off, as most queries won't contain it, and we can just check for it. That means we don't need all the config updates either
// TODO: add config.enableProviderQueryParameter for allow | ||
// config.enableProviderQueryParameter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider removing if we don't need the config-page updates.
event.request.url
should contain the whole request string, including query parameters.
@SgtPooki thanks for looking into this. This PR needs the PR mentioned in PR description though ipfs/helia-verified-fetch#242 and it is still not finalized. Based on @lidel 's request, ipfs/helia-verified-fetch#242 adds the provider parameter behind a feature flag, and disabled by default. With that in mind, the only way to follow same behaviour and be consitent is by manually toggling it. In my opinion, it would not make sense that in @SgtPooki do you have any reasons in mind why this should be by default on here? |
@vasco-santos IMO: the query parameter is a "config toggle" itself.. so why do we need a config toggle in the UI? If it's optionally enable-able in verified-fetch, then we can enable that verified-fetch setting in this repo, and those who pass the parameter to inbrowser.tld are choosing to use it. The only benefits I see with adding this as a UI config toggle on inbrowser.tld:
Honestly, the main reason I am against adding a UI toggle for this experimental feature is that the config is already somewhat unwieldy. |
Add support for experimental provider query parameter
Description
Bubbles up feature added in ipfs/helia-verified-fetch#242
Notes & open questions
Change checklist