-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fetch API with IPFS url's are blocked by cross-site tracking prevention #18204
Comments
But you didn’t link to loclahost. You linked to |
Exactly. Your reply does make me wonder a bit as to what you mean? I can't quite figure out if you agree with me that it's a bug or if you think that i should've used localhost instead (the later would be wrong in my opinion). |
@markg85 are you doing that successful My understanding is Brave decided that fetch from You could do a test request for |
Hi @lidel I did say it in my original post but i'll summarize it again. Open a developer console and type:
This works. Now type:
This fails In my opinion these results make no logical sense at all. The site is loaded on http://. I'm expecting either both to work or both to fail. In this case the Now if we compare this to what @da2x said then both should fail. Clearly the I don't know how i can explain this any more clear. Please specifically ask what you want me to show or demonstrate if this isn't clear. |
Any update on this? Workarounds? If the goal is for more adoption of web3... this certainly stands to be a hinderance. I've just spent time reading about the somewhat similar case of blocking https from ipfs loaded sites (and it makes sense)... however blocking ipfs from https loaded sites does not seem to fit the same threat model?! And certainly, this seems to be a bug rather than a feature add... I'm currently working on a web3 app which is (still) loaded via https and yet fetches ipfs images and other content. I have failover (ipfs fails then use an ipfs gateway link) built in, however it's rather frustrating to see... Loading the entire site over ipfs is not an option at this time. |
Also wondering how to get around this, don't fancy the gateway solution but I guess that's the way to go. |
The IPFS local node and scheme has been deprecated |
Hi,
What i'm trying to do is download a file via javascript from IPFS.
In my Brave browser i have a local node enabled and put the local gateway to that node. So i'm not running the brave build in IPFS node!
Now when you access a IPFS file the URL will be translated to a localhost one for the local gateway that is setup. This triggers the "Cross-site tracking" prevention shield and subsequently blocks the URL.
I am using the Fetch API here but i suppose using XMLHttpRequest would show the same issue. I haven't tried that.
In your browser console (F12 -> console tab) type this:
You might need to wait a few seconds but it will eventually come back with this exact error:
Now if we try the exact same IPFS resource but with the IPFS protocol handles then it (weirdly...) works:
This throws no error and works just fine. Which is ironic because this is likely internally translated to the very same localhost URL.
I suppose a fix would be to ignore localhost for the cross-site tracking prevention.
Let me know if more information is needed, i'd be happy to help!
The text was updated successfully, but these errors were encountered: