Skip to content

Commit

Permalink
Don't duplicate headers
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcreaser committed Sep 18, 2024
1 parent 815806a commit 4a644f2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ internal class WebSocketConnectionInterceptor(
// runBlocking is okay because we are on an IO thread when the interceptor is called
val headers = runBlocking { authorizer.getWebsocketConnectionHeaders(endpoint) }
val builder = chain.request().newBuilder()
headers.forEach { header -> builder.addHeader(header.key, header.value) }
builder.addHeader("host", endpoint.serverUrl.host)
headers.forEach { header -> builder.header(header.key, header.value) }
builder.header("host", endpoint.serverUrl.host)
return chain.proceed(builder.build())
}
}

0 comments on commit 4a644f2

Please sign in to comment.