ipfs/ipfs-companion

Redirect ipfs.io/api/v0/*

Open

#870 opened on Apr 23, 2020

View on GitHub
 (0 comments) (0 reactions) (0 assignees)JavaScript (364 forks)batch import
P2effort/hourshelp wantedkind/enhancementstatus/ready

Repository metrics

Stars
 (1,992 stars)
PR merge metrics
 (Avg merge 53d 3h) (1 merged PR in 30d)

Description

I suspect some apps may leverage the fact that a subset of APIs is exposed under ipfs.io/api/v0/.

Companion should redirect things like https://ipfs.io/api/v0/cat?arg=/ipns/docs.ipfs.io/assets/logo.svg (especially ones with ranges and offsets) to maximize the use of local nodes.


  • Q: could this be a partial replacement for window.ipfs?
    • A: Yes, for basic read-only commands like ipfs.cat. People could simply code against https://ipfs.io/api/v0 and browsers with native support (or companion extension) would just redirect those requests to local node.

Contributor guide