From b0d4feec19b3d4dc796e580789b163d2c3855d55 Mon Sep 17 00:00:00 2001 From: Shailesh Patil <53746241+mineme0110@users.noreply.github.com> Date: Wed, 30 Aug 2023 11:46:54 +0100 Subject: [PATCH] fix(mediator): Enabled X-Request-Id ATL-5568 (#104) * fix(mediator): Enabled X-Request-Id ATL-5568 Signed-off-by: Shailesh Patil * fix(mediator): Enabled X-Request-Id ATL-5568 Signed-off-by: Shailesh Patil --------- Signed-off-by: Shailesh Patil --- .../scala/io/iohk/atala/mediator/utils/HttpHelpers.scala | 2 +- infrastructure/charts/mediator/templates/apisixroute.yaml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/http-utils/jvm/src/main/scala/io/iohk/atala/mediator/utils/HttpHelpers.scala b/http-utils/jvm/src/main/scala/io/iohk/atala/mediator/utils/HttpHelpers.scala index 2f19d8e8..b688e29d 100644 --- a/http-utils/jvm/src/main/scala/io/iohk/atala/mediator/utils/HttpHelpers.scala +++ b/http-utils/jvm/src/main/scala/io/iohk/atala/mediator/utils/HttpHelpers.scala @@ -23,7 +23,7 @@ extension [R, Err](app: HttpApp[R, Err]) "fly-client-ip", "client-ip", composeAnnotate( - "request-id", + "X-Request-ID", "fly-request-id", composeAnnotate( "user-agent", diff --git a/infrastructure/charts/mediator/templates/apisixroute.yaml b/infrastructure/charts/mediator/templates/apisixroute.yaml index 7c267d66..3ddf16a1 100644 --- a/infrastructure/charts/mediator/templates/apisixroute.yaml +++ b/infrastructure/charts/mediator/templates/apisixroute.yaml @@ -24,6 +24,11 @@ spec: enable: true config: regex_uri: ["^/(.*)","/$1"] + - name: request-id + enable: true + config: + header_name: "X-Request-ID" + include_in_response: true {{ template "cors" . }} ---