From 3da85c5ee298caa202a0acfa9593adad75c1917e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mili=C4=87?= Date: Mon, 19 Sep 2022 12:36:43 +0200 Subject: [PATCH 1/2] docfix/Add comments regarding request headers info box --- src/main/scala/code/lib/ObpAPI.scala | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/scala/code/lib/ObpAPI.scala b/src/main/scala/code/lib/ObpAPI.scala index fb8be40d..82817a8d 100644 --- a/src/main/scala/code/lib/ObpAPI.scala +++ b/src/main/scala/code/lib/ObpAPI.scala @@ -701,6 +701,9 @@ object OBPRequest extends MdcLoggable { addAppAccessIfNecessary.foreach(header => request.setRequestProperty(header.key, header.value)) + // Please note that this MUST be called before we set the body of our request + // Otherwise it can fail due to IllegalStateException("Already connected") + // In the end we cannot see info at Request Header's Box at API Explorer val requestHeaders = tryo { addAppAccessIfNecessary.map(header => (header.key, Set(header.value))) ::: request.getRequestProperties().asScala.mapValues(_.asScala.toSet).toList From cbf65dfa288bd13212f3f744d178be13dc61ce31 Mon Sep 17 00:00:00 2001 From: chrisjsimpson Date: Thu, 22 Sep 2022 20:28:57 +0100 Subject: [PATCH 2/2] Fix #2 speed up container build use mount caching --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 895ca4d5..ea0f02da 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,8 +6,8 @@ COPY src src # Copy default props file COPY src/main/resources/props/sample.props.template src/main/resources/props/default.props COPY src/main/resources/container.logback.xml.example src/main/resources/default.logback.xml -RUN mvn -e -B dependency:resolve -RUN mvn -e -B package +RUN --mount=type=cache,target=/root/.m2 mvn -e -B dependency:resolve +RUN --mount=type=cache,target=/root/.m2 mvn -e -B package FROM jetty