diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/scala/xyz/driver/core/date.scala | 1 | ||||
-rw-r--r-- | src/main/scala/xyz/driver/core/rest.scala | 11 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/main/scala/xyz/driver/core/date.scala b/src/main/scala/xyz/driver/core/date.scala index f0b9bf6..5a6f736 100644 --- a/src/main/scala/xyz/driver/core/date.scala +++ b/src/main/scala/xyz/driver/core/date.scala @@ -18,6 +18,7 @@ object date { val AUGUST = tagMonth(Calendar.AUGUST) val SEPTEMBER = tagMonth(Calendar.SEPTEMBER) val OCTOBER = tagMonth(Calendar.OCTOBER) + val NOVEMBER = tagMonth(Calendar.NOVEMBER) val DECEMBER = tagMonth(Calendar.DECEMBER) } diff --git a/src/main/scala/xyz/driver/core/rest.scala b/src/main/scala/xyz/driver/core/rest.scala index da6df96..ecc3027 100644 --- a/src/main/scala/xyz/driver/core/rest.scala +++ b/src/main/scala/xyz/driver/core/rest.scala @@ -33,8 +33,9 @@ object rest { } object ContextHeaders { - val AuthenticationTokenHeader = "WWW-Authenticate" - val TrackingIdHeader = "X-Trace" + val AuthenticationTokenHeader = "Authorization" + val AuthenticationHeaderPrefix = "Bearer" + val TrackingIdHeader = "X-Trace" object LinkerD { // https://linkerd.io/doc/0.7.4/linkerd/protocol-http/ @@ -61,7 +62,11 @@ object rest { h.name === ContextHeaders.AuthenticationTokenHeader || h.name === ContextHeaders.TrackingIdHeader // || ContextHeaders.LinkerD.isLinkerD(h.lowercaseName) } map { header => - header.name -> header.value + if (header.name === ContextHeaders.AuthenticationTokenHeader) { + header.name -> header.value.stripPrefix(ContextHeaders.AuthenticationHeaderPrefix).trim + } else { + header.name -> header.value + } } toMap } |