Cloudflare overwriting 504 response

We have a server set up like so: Cloudflare ↔ HAProxy ↔ Server. From time to time, HAProxy will throw a 504 error if our server is too slow to respond to a request. To this 504 response we add some custom headers that are important for our app to work. When using Cloudflare however, cloudflare itnercepts this 504 and replaces it with its own 504, wiping out the headers we had set. How do we stop it from doing that?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.