Skip to content

Commit

Permalink
fix(ci): switch fallback download to public gateway
Browse files Browse the repository at this point in the history
This change stops the abuse of preload servers :-)
  • Loading branch information
lidel committed Nov 4, 2018
1 parent 83c0f75 commit 4d86259
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/fetch-webui-from-gateway.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ const cid = process.argv[2]
const destination = process.argv[3]

// pick random preloader
const no = Math.round(Math.random()) // 0 or 1
const url = 'https://node' + no + '.preload.ipfs.io/api/v0/get?arg=' + cid + '&archive=true&compress=true'
// const no = Math.round(Math.random()) // 0 or 1
// const url = 'https://node' + no + '.preload.ipfs.io/api/v0/get?arg=' + cid + '&archive=true&compress=true'

// use public gw
const url = 'https://ipfs.io/api/v0/get?arg=' + cid + '&archive=true&compress=true'

console.log('Fallback to HTTP GET from: ' + url)

Expand Down

0 comments on commit 4d86259

Please sign in to comment.