I have set up an API endpoint on my Digital Ocean VPS to receive incoming SMS to my Twilio number. It was working.
Then I started using CloudFlare. I believe that it stopped working after that, but since I receive SMS so infrequently, I am not absolutely sure. Although Twilio's website indicates that they sent an HTTP request and received a 502 Bad Gateway
error, my server logs never registered any incoming requests from Twilio. I know that my API endpoint works because when I manually enter the API endpoint in my Chrome browser, my server receives it and logs the GET request as expected.
I tried asking Twilio's support for the full details of the supposedly failed request, but they refuse to give it to me.
Does anyone know which setting in CloudFlare to adjust that may fix this? I've tried turning off and reducing all the security settings as I thought it may be a firewall issue. How else can I go about debugging this problem without turning off CloudFlare completely (I need it on for other purposes)? I will accept the first answer or advice that leads to the solution. Thanks!
EDIT: this is the response from CloudFlare
One thing to ask them, is whether they support the SSL configuration of Universal SSL - which uses SNI and ECDSA. We have seen instances of 3rd party services not supporting one or both of these, and therefore failing to make calls via HTTPS.
Universal SSL support is defined by the client machine's support for two newer features:
Server Name Indication (SNI) Elliptic Curve certificates (ECDSA) What browsers work with Universal SSL?
If you need broader browser compatibility for older browsers/operating systems, our Pro plan plan provides this.
Also, if you want to get full information about what your browser supports, this site will run a check on your browser and tell you the support your browser has for protocols, ciphers and SNI: