meteorhacks / cluster

Clustering solution for Meteor with load balancing and service discovery
https://meteorhacks.com/cluster-a-different-kind-of-load-balancer-for-meteor.html
MIT License
631 stars 80 forks source link

Cluster: web proxy error: Connection droped when doing ajax call via chrome extension #69

Open satyavh opened 9 years ago

satyavh commented 9 years ago

Not sure if this is a Cluster issue, but I need to eliminate all possibilities.

I have a Chrome extension that calls a Restivus configured API, which works all fine on localhost. But then I deployed a Cluster (which is awesome btw!), and I simply can't get it to work anymore. No matter what I try I keep getting Origin Errors.

Failed to load resource: the server responded with a status of 520 (Origin Error)

or

net::ERR_EMPTY_RESPONSE

When I check the server logs I simply see; Cluster: web proxy error: Connection droped

things I've tried are

WebApp.connectHandlers.use("/api/*", (req, res, next) ->
    res.setHeader("Access-Control-Allow-Origin", "*")
    res.setHeader("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS")
    res.setHeader("Access-Control-Allow-Headers", 'Origin, X-Requested-With, Content-Type, Accept, Authorization')    
    return next()  
  )

as well as configuring OPTIONS call for my API, that returns those headers.

But I feel the problem is in the Cluster: web proxy error: Connection droped

Any ideas?

(Sidenote, notice the typo in the error: droped instead of dropped)