Skip to content

Commit 6dd5f51

Browse files
committed
fix: opt-out from redirects done by browser extension
Context: ipfs/ipfs-companion#505
1 parent f2e2399 commit 6dd5f51

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: app.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ function checkGateways (gateways) {
2727
let checked = 0
2828
gateways.forEach((gateway) => {
2929
const gatewayAndHash = gateway.replace(':hash', hashToTest)
30-
fetch(gatewayAndHash)
30+
// opt-out from gateway redirects done by browser extension
31+
const testUrl = gatewayAndHash + '#x-ipfs-no-redirect'
32+
fetch(testUrl)
3133
.then(res => res.text())
3234
.then((text) => {
3335
const matched = text.trim() === hashString.trim()

0 commit comments

Comments
 (0)