问题
I'm having a problem using the foursquare realtime API and a self signed certificate. Every time I make a test push I get back "Your Server returned: 502 Bad Gateway" but I'm 90% sure it's not actually reaching my server (I have it set to watch get & post at any address and nothing comes through, if I get/post to any address on the server it works. Local and remote.) Is there some kind of issue with self signed certs and the push api?
回答1:
The 502 error makes it sound like it could be a configuration error on your side, unrelated to your actual code, or foursquare. Generally speaking, running self-signed certs should be fine for our Push API's, so I doubt that's your issue.
If you're not already familiar with 502 errors, you can read up on them a bit here: http://www.checkupdown.com/status/E502.html
I know you said it was working for general remote connections, but it's possible there's something your host doesn't like about requests originating from foursquare? We use Amazon Web Services, so the originating IPs come from a large pool of IP addresses that sometimes end up on block lists (if say, someone wrote a misbehaving app also on Amazon Web Services).
来源:https://stackoverflow.com/questions/10729743/realtime-api-self-signed-certificate