3

Using the Request Transformer plugin, we are transforming a query string to multiple headers. This is done globally for all our services.

We also want do other specific transformations for a subset of a services. From what I read here that does not seem to be possible.

Am I misunderstanding this? Is there perhaps a different way of doing it?

RckMrkr
  • 985
  • 1
  • 10
  • 14

1 Answers1

1

In my perspective, yes, this (the precedence of plugin execution) makes kind of impossible to do what you want using the Request Transformer plugin.

The other way of doing it that i can imagine is adding to your Kong a custom plugin that would perform your "2nd phase" transformation. You could for example, fork the repo of the Request Transformer plugin itself (https://github.com/Kong/kong-plugin-request-transformer) , and add a second version of it to your Kong, and then you can apply two "different" request transforming plugins, but this seems kind of ugly.

  • Another way of doing "multiple" transformations would be with Reedelk Transformer https://docs.konghq.com/hub/reedelk/reedelk-transformer/ plus groovy scripts. You can see a nice demo here https://www.youtube.com/watch?v=c5Aw2XpwKos&feature=youtu.be – bovino Marcelo Bezerra Jan 11 '21 at 19:52