fix: Signatureヘッダーの変更をすべてのヘッダーに適用

This commit is contained in:
usbharu 2023-04-29 16:19:07 +09:00
parent 28a543166a
commit d130f5c133
1 changed files with 2 additions and 3 deletions

View File

@ -150,10 +150,9 @@ val httpSignaturePlugin = createClientPlugin("HttpSign", ::HttpSignaturePluginCo
}) })
val signatureHeader = request.headers.get("Signature") val signatureHeader = request.headers.getAll("Signature").orEmpty()
val replace = signatureHeader?.replace("; ", ",")?.replace(";",",")
request.headers.remove("Signature") request.headers.remove("Signature")
request.header("Signature", replace) signatureHeader.map { it.replace("; ",",").replace(";",",") }.forEach { request.header("Signature", it) }
} }
} }