ipfs/ipfs-companion

Intercept URLs for JS libs at public CDNs

Open

#674 opened on Jan 31, 2019

View on GitHub
 (4 comments) (6 reactions) (0 assignees)JavaScript (364 forks)batch import
P3exp/intermediatehelp wantedkind/enhancementstatus/ready

Repository metrics

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

Description

Extracted from https://github.com/ipfs-shipyard/ipfs-companion/issues/570#issuecomment-421811923

Summary

Intercept URLs from public CDNs like unpkg.com and load them from IPFS.

Detection

Two ways:

  • Seamless: work with CDN operators to expose assets on IPFS paths /ipfs/<cid>/**/*.min.js
  • Grunt: identify the most popular assets across free CDNs, create a JSON mapping between filename/URL and CID and ship it with ipfs-companion as additional hint for creating redirects.

Additional Resources

Contributor guide