Skip to content

Commit

Permalink
fix: opt-out from redirects done by browser extension
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Jun 27, 2018
1 parent f2e2399 commit 6dd5f51
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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-no-redirect'
fetch(testUrl)
.then(res => res.text())
.then((text) => {
const matched = text.trim() === hashString.trim()
Expand Down

0 comments on commit 6dd5f51

Please sign in to comment.