X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=dhall%2Fserver%2Fservice%2Fplugin%2FcorrelationId.dhall;h=41c572098cfe26805366f3cd391a781fd0174984;hb=d8c5e33f6015e3f17aaf5fd290b1834e6e6c1049;hp=d5d592860d0db6134576c57aa2fa40a5df22c08a;hpb=25250c8c24a3c0b32c92eee5552ad7156115f03c;p=github%2Ffretlink%2Fansible-kong-app.git diff --git a/dhall/server/service/plugin/correlationId.dhall b/dhall/server/service/plugin/correlationId.dhall index d5d5928..41c5720 100644 --- a/dhall/server/service/plugin/correlationId.dhall +++ b/dhall/server/service/plugin/correlationId.dhall @@ -2,22 +2,16 @@ let Plugin = ./Plugin.dhall let config = ./Config.dhall -in λ(generator : Optional Text) - → { name = - "correlation-id" +in λ(generator : Optional Text) → + { name = "correlation-id" , config = config.CorrelationId - { header_name = - "X-correl" - , echo_downstream = - True - , generator = - Optional/fold - Text - generator - Text - (λ(t : Text) → t) - "uuid#counter" - } + { header_name = "X-correl" + , echo_downstream = True + , generator = + merge + { None = "uuid#counter", Some = λ(x : Text) → x } + generator + } } : Plugin