Conditionally add values/attributes to response header

Hello All,
We have Kong API gate way Infront of a monolith app which has both UI & RESTful APIs,
We are using “response-transformer” to add response header to the upstream response.
However, we have couple of issues / limitations

  1. Unable to add cookie attribute such as HttpOnly;Secure. Also, we need to selectively add SameSite attribute to only one cookie
  2. Unable to add “Cache-Control” header only if Content-Type is “text/html”. We need to allow static resources to be cached by browser.

is there a way to achieve above requirement using response-transformer or any other plugin?

Thanks a lot for your time and help

© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ