From 6dd5f510df6541ba845143b1d0ed5e60caf92a14 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Wed, 27 Jun 2018 12:37:55 +0200 Subject: [PATCH] fix: opt-out from redirects done by browser extension Context: https://github.com/ipfs-shipyard/ipfs-companion/pull/505 --- app.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index b6cee74e..cea7eaa9 100644 --- a/app.js +++ b/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-no-redirect' + fetch(testUrl) .then(res => res.text()) .then((text) => { const matched = text.trim() === hashString.trim()