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

Allow webRequest.onBeforeRequest to redirect to libdweb protocol handler #74

Closed
lidel opened this issue Aug 16, 2018 · 1 comment
Closed

Comments

@lidel
Copy link
Contributor

lidel commented Aug 16, 2018

Summary

Thanks to webRequest.onBeforeRequest API WebExtensions are able to inspect HTTP request before it is sent and redirect it to a different URL.

It would be neat if we could use this WebExtension API for uplifting protocol-specific HTTP requests by cancelling and redirecting them to native protocol handler.

Example: IPFS Gateway on HTTP

In context of IPFS we want to redirect requests made to HTTP gateways:

  1. detect HTTP gateways: https://ipfs.io/ipfs/<cid> and https://<cid>.ipfs.foo.tld
  2. redirect to ipfs://<cid>

Problem

Right now cross-protocol redirect via webRequest.onBeforeRequest is not possible.
PoC redirect from https:// to ipfs:// gets blocked:

screenshot_12

It feels related to discussion in #52, but here we talk about redirecting from http:// to foo:// via webextension API, not loading content embedded in HTML page.

Let me know if more data or MVP demo is needed.

@Gozala
Copy link
Contributor

Gozala commented Aug 7, 2019

Moving to https://bugzilla.mozilla.org/show_bug.cgi?id=1572200 as it can't be addressed here

@Gozala Gozala closed this as completed Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants