I’ve a serious problem. There’s an api in my webservice (Springboot) which might take a few seconds to respond. When I use domain name through Cloudflare, I get 502 bad gateway after exactly 5 seconds, but when I use my server ip address (bypassing Cloudflare) I get correct response after say 7 seconds. There’s an Nginx in front of my backend webservice as reverse proxy, but it doesn’t cause this problem, because as I said, it works correctly when I use my server’s ip address directly. I know the api is being called and working correctly because I can see the logs of my server.
This is confusing and I need a help asap, because this api is being used by our clients.