Merge pull request #19 from lidel/x-ipfs-no-redirect
Opt-out from gateway redirects done by IPFS Companionmerge-requests/2/merge
commit
555d0de3c7
4
app.js
4
app.js
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue