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

This commit is contained in:
usbharu 2023-04-29 16:19:07 +09:00
parent 7915189163
commit 2fde447e5a
Signed by: usbharu
GPG Key ID: 6556747BF94EEBC8
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) }
} }
} }