fix: HTTP Signatureのヘッダー取得時に大文字小文字の差を無視するように

This commit is contained in:
usbharu 2023-12-03 10:27:46 +09:00
parent bfc5c9e110
commit be7bd590eb
1 changed files with 3 additions and 1 deletions

View File

@ -23,7 +23,9 @@ class InboxControllerImpl(private val apService: APService) : InboxController {
val request = (requireNotNull(RequestContextHolder.getRequestAttributes()) as ServletRequestAttributes).request
val headersList = request.headerNames?.toList().orEmpty()
if (headersList.contains("Signature").not()) {
LOGGER.trace("Inbox Headers {}", headersList)
if (headersList.map { it.lowercase() }.contains("signature").not()) {
return ResponseEntity.status(HttpStatus.UNAUTHORIZED)
.header(
WWW_AUTHENTICATE,