I configured cloudflare on my web application. Everything works fine.
However, when my API backend returns 5xx error CF intercepts it and returns its branded 502 error HTML page. I have two big issues here:
- The API endpoints should always return JSON to be understood correctly by the clients
- The original error from my server contains helpful information for the client to troubleshoot the issue.
So is there any way I can bypass CF error page and get the original response from the API back to the client?