Merge branch 'master' into patch-1

merge-requests/2/merge
victorbjelkholm 2018-09-17 19:41:10 +02:00 committed by GitHub
commit 908fd0c927
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

4
app.js
View File

@ -27,7 +27,9 @@ function checkGateways (gateways) {
let checked = 0
gateways.forEach((gateway) => {
const gatewayAndHash = gateway.replace(':hash', hashToTest)
fetch(gatewayAndHash)
// opt-out from gateway redirects done by browser extension
const testUrl = gatewayAndHash + '#x-ipfs-companion-no-redirect'
fetch(testUrl)
.then(res => res.text())
.then((text) => {
const matched = text.trim() === hashString.trim()

View File

@ -15,7 +15,10 @@
"https://ipfs.work/ipfs/:hash",
"https://ipfs.wa.hle.rs/ipfs/:hash",
"https://api.wisdom.sh/ipfs/:hash",
"https://gateway.swedneck.xyz/ipfs/:hash",
"https://gateway.blocksec.com/ipfs/:hash",
"https://ipfs.renehsz.com/ipfs/:hash"
"https://ipfs.renehsz.com/ipfs/:hash",
"https://cloudflare-ipfs.com/ipfs/:hash",
"https://ipns.co/:hash",
"https://ipfs.netw0rk.io/ipfs/:hash",
"https://gateway.swedneck.xyz/ipfs/:hash"
]