Skip to content

Brave: subresource assets (e.g. images, video, scripts) with gateway URL not redirected #1095

@dokterbob

Description

@dokterbob

Describe the bug
When a website links to assets over IPFS using gateway URL's, they are loaded over the gateway rather than redirected to a configured gateway (e.g. local node).

To Reproduce

  1. Ensure local node is running.
  2. Ensure IPFS Companion is enabled.
  3. Load demo page with link to image on https://dweb.link: https://dweb.link/ipfs/QmaZKqW2KM4P6cynUg7u8htjgn1LvD9io7cVEpjCdpAcDr
  4. Ensure redirect to local node (e.g. http://bafybeifvrn2fj77a7xlhgi3r5yfqdllibcyoozcd65ggzzhdj47rwbirnu.ipfs.localhost:8080/).
  5. Open Network tab in DevTools.
  6. Reload page.
  7. Verify request URL for image on website.

Expected behavior
Image URL is replaced by URL on local node (e.g. http://bafybeifnki7op77j43swrlukkjq7whi5wxae7zys52fqgrsycars656xhq.ipfs.localhost:8080/QmUxhzKtwaDm5T8HnxfVCxogH2K7MshYVdtc1mCaFFFqqm-400-400.webp), as would be the case then the image URL is opened directly, and loaded from there. Instead, it's loaded from the original URL from the remote gateway (e.g. https://bafybeifnki7op77j43swrlukkjq7whi5wxae7zys52fqgrsycars656xhq.ipfs.dweb.link/QmUxhzKtwaDm5T8HnxfVCxogH2K7MshYVdtc1mCaFFFqqm-400-400.webp).

Screenshots
image
image

Desktop:

  • OS: macOS Catalina 10.15.7 (19H2026)
  • Browser: Brave
  • Version: Version 1.43.89 Chromium: 105.0.5195.102 (Official Build) (x86_64)
  • IPFS Companion: v2.19.1

Additional context
I have double checked that with the internet disconnected, the image loads from the direct URL and the demo page loads, but the image does not load on the page.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions