Plugin/middleware to transform response

Hi, there are two options:

  1. Use the built-in response transformation middleware functionality: Response Body Transform, Response Header Injection and Response Header Deletion. You will find more details here.

  2. We don’t support custom response middleware directly but you can use a feature called ReturnOverrides which enables the usage of your own implementation to hit the upstream endpoint, the steps are:

  • Create a custom middleware.
  • Send the request to upstream using your middleware implementation (typically using a HTTP module in the language you’re using).
  • Set the ReturnOverrides field on the request object.

More details on this field here. This approach is available on rich plugins, gRPC or Python based, I suggest starting here.