aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--dhall/server/service/plugin/Config.dhall10
-rw-r--r--dhall/server/service/plugin/mkRequestTransformer.dhall16
2 files changed, 13 insertions, 13 deletions
diff --git a/dhall/server/service/plugin/Config.dhall b/dhall/server/service/plugin/Config.dhall
index 73a333f..d54436b 100644
--- a/dhall/server/service/plugin/Config.dhall
+++ b/dhall/server/service/plugin/Config.dhall
@@ -1,9 +1,9 @@
1< CorrelationId : 1< CorrelationId :
2 { header_name : Text, echo_downstream : Bool } 2 { header_name : Text, echo_downstream : Bool }
3| RequestTransformer : 3| RequestTransformer :
4 { `add.headers` : Text } 4 { add : { headers : List Text } }
5| RequestTermination : 5| RequestTermination :
6 { status_code : Natural, content_type : Text, body : Text } 6 { status_code : Natural, content_type : Text, body : Text }
7| IPRestriction : 7| IPRestriction :
8 { whitelist : Text } 8 { whitelist : Text }
9> 9> \ No newline at end of file
diff --git a/dhall/server/service/plugin/mkRequestTransformer.dhall b/dhall/server/service/plugin/mkRequestTransformer.dhall
index 90789c8..1d8d608 100644
--- a/dhall/server/service/plugin/mkRequestTransformer.dhall
+++ b/dhall/server/service/plugin/mkRequestTransformer.dhall
@@ -1,11 +1,11 @@
1 let Plugin = ./Plugin.dhall 1let Plugin = ./Plugin.dhall
2 2
3in let config = constructors ./Config.dhall 3in let config = constructors ./Config.dhall
4 4
5in λ(header : Text) 5 in λ(header : Text)
6 → { name = 6 → { name =
7 "request-transformer" 7 "request-transformer"
8 , config = 8 , config =
9 config.RequestTransformer { `add.headers` = header } 9 config.RequestTransformer { add = { headers = [ header ] } }
10 } 10 }
11 : Plugin 11 : Plugin \ No newline at end of file