Search code examples
responsehaproxy

modify content of http response via haproxy


i'm routing a soap requests via a haproxy and one of the systems responding to requests changed ist response structure by adding namespaces to the XML Elements <myresponse> became <newnamespace:myresponse> after a new version was deployed.

a client system that i dont have under my control can't handle the changes to the payload. since i cant Change the Code of this Client i want to delete newnamespace: from the response payload via haproxy.

i've tried Option rspirep ^:\ "mynewnamespace:" "" within my backend configuration but it had no effect whatsoever

is that possible and if so, how?


Solution

  • In the section what HAProxy is and is not we can read, HAProxy is not:

    a data scrubber : it will not modify the body of requests nor responses.