Skip to content

Commit

Permalink
fix: use random preloader as a fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Oct 3, 2018
1 parent 02ee4de commit fd7586f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/fetch-webui-from-gateway.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ const progress = require('request-progress')
const cid = process.argv[2]
const destination = process.argv[3]

const url = 'https://venus.i.ipfs.io/api/v0/get?arg=' + cid + '&archive=true&compress=true'
// 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'

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

Expand Down

0 comments on commit fd7586f

Please sign in to comment.