Skip to content
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

webui randomly stops working because API requests return 403 #1839

Closed
d10r opened this issue Oct 14, 2015 · 6 comments
Closed

webui randomly stops working because API requests return 403 #1839

d10r opened this issue Oct 14, 2015 · 6 comments

Comments

@d10r
Copy link

d10r commented Oct 14, 2015

In my http://localhost:5001/webui, sometimes the Ajax API requests stop working, returning 403 Forbidden.

When trying the cURL (copied from browser dev console) in terminal, it also returned 403.
Interesting find: when removing the "Referer" header from the request, the 403 went away.
Related IRC snippet:
<rand_me> deltab: does that explain it for you?
no, but it indicates where to look
https://github.com/ipfs/go-ipfs/blob/d4938c9b0cd57c52c71ec83998a8288c3247826c/commands/http/handler.go#L350

If I restart the ipfs daemon, the issue sometimes persists and sometimes goes away. No pattern found so far.

Info about how to enable debug log in ipfs config is welcome. Maybe that would help.

@ghost
Copy link

ghost commented Oct 14, 2015

That's CORS rejecting the request, try setting API.HTTPHeaders.

@mappum
Copy link
Contributor

mappum commented Oct 14, 2015

Info about how to enable debug log in ipfs config is welcome. Maybe that would help.

You can get the daemon to output debug info to console with ipfs daemon --debug.

@d10r
Copy link
Author

d10r commented Oct 14, 2015

That's CORS rejecting the request

Yes, sounds like CORS. However I wonder:

  • how comes it sometimes works (always using same URLs)?
  • shouldn't the dev tools console tell if it's CORS? It didn't

try setting API.HTTPHeaders.

Can you please tell me how exactly to do this? I'm new to ipfs.

@jbenet
Copy link
Member

jbenet commented Oct 14, 2015

Not sure, but this may be part of a bug we're about to ship a fix for.

@chpio
Copy link

chpio commented Jan 18, 2016

same problem here with the docker :release and :master tags.

@whyrusleeping
Copy link
Member

This is generally a CORS problem, see ipfs daemon --help for more info there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants