A bit late to the party, but I encountered the same problem but none of the answers seem to work. Turns out the problem arose from a bad proxy configuration of nginx. I figured that out after noticing that my requests returned a 502 error.