diff options
author | Paul Bonaud <paul.bonaud@fretlink.com> | 2020-08-14 18:39:27 +0200 |
---|---|---|
committer | Paul Bonaud <paul.bonaud@fretlink.com> | 2020-08-14 18:41:10 +0200 |
commit | 2187c77a0f6b6d3e178e6d1a695bc954f57ecb72 (patch) | |
tree | 05c889fa60f44042b92f04b7f0324ea3b2117e59 /dhall/server/service/plugin/mkResponseTransformer.dhall | |
parent | f131496c3e23d30c30dd597ab734b0f771f4a4d9 (diff) | |
download | ansible-kong-app-2187c77a0f6b6d3e178e6d1a695bc954f57ecb72.tar.gz ansible-kong-app-2187c77a0f6b6d3e178e6d1a695bc954f57ecb72.tar.zst ansible-kong-app-2187c77a0f6b6d3e178e6d1a695bc954f57ecb72.zip |
dhall(plugins): add binding for the 'response-transformer' plugin
This plugin is very similar to the existing request-transformer
plugin.
We can expose a Dhall helper to generate this plugin configuration as
the other plugins.
Diffstat (limited to 'dhall/server/service/plugin/mkResponseTransformer.dhall')
-rw-r--r-- | dhall/server/service/plugin/mkResponseTransformer.dhall | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/dhall/server/service/plugin/mkResponseTransformer.dhall b/dhall/server/service/plugin/mkResponseTransformer.dhall new file mode 100644 index 0000000..d6a05e8 --- /dev/null +++ b/dhall/server/service/plugin/mkResponseTransformer.dhall | |||
@@ -0,0 +1,9 @@ | |||
1 | let Plugin = ./Plugin.dhall | ||
2 | |||
3 | let config = ./Config.dhall | ||
4 | |||
5 | in λ(header : Text) → | ||
6 | { name = "response-transformer" | ||
7 | , config = config.ResponseTransformer { add.headers = [ header ] } | ||
8 | } | ||
9 | : Plugin | ||