-
Notifications
You must be signed in to change notification settings - Fork 32
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
Gateway requests responds with 403 - Forbidden
#17
Comments
@fsdiogo what are steps to reproduce this? |
@lidel yes! Then use a valid hash and go to: http://localhost:3000/#/<hash> That will open the download page and send a request to the gateway. |
I eyeballed failing (403) and standalone request (200): 403 is triggered when either $ curl 'https://ipfs.io/api/v0/ls?arg=QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR'
{"Objects":[{"Hash":"QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR","Links":[]}]}
$ curl 'https://ipfs.io/api/v0/ls?arg=QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR' -H 'Origin: http://localhost:3000'
403 - Forbidden
$ curl 'https://ipfs.io/api/v0/ls?arg=QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR' -H 'Referer: http://localhost:3000/'
403 - Forbidden AFAIK its the |
When sending the request to a local JS and Go daemon it succeeds. As @lidel mentioned, it's probably some header check in the gateway that fails and returns 403. I'll expose this to the |
Actually its even more bizarre!
Looking at go-ipfs/core/corehttp/commands.go#L44-L49 it makes sense again(?): the Update from @lgierth confirms the error is caused by recent changes in
|
When in the
Download
page, the user shouldn't have to have an IPFS instance or daemon running, so we'll use theipfs.io
gateway to fetch the files and download them.The problem here is that when making the request the response is always
403 - Forbidden
.ipfs-share-files/src/pages/download/Download.js
Line 20 in 7ed1070
ipfs-share-files/src/bundles/files.js
Lines 222 to 248 in 7ed1070
Both in Postman or directly in the browser the response comes OK, but not in the app.
The text was updated successfully, but these errors were encountered: