Next.js Discord

Discord Forum

Uppercase Headers

Unanswered
Brown bear posted this in #help-forum
Open in Discord
Brown bearOP
Hey! A device that's reaches out to my Next.js service requires a headers to be a specific case like CHECK-HASH-MD5. But if I do:
return new NextResponse(blob, { headers: { 'CHECK-HASH-MD5': md5 } })


The result looks all lower case!!
HTTP/1.1 200 OK
check-hash-md5: lasdklsadlkaslkdsklfjsdfdf


Why!! πŸ™ How can I get capital headers? I don't have an option to remove the case sensitivity on the device.

4 Replies

Brown bearOP
well, the device seems to read them sensitively πŸ™
I guess then you can check for both variants?
i think you have to tell that device to fix their code here. their code is not compliant to the http spec hence is buggy, you can't do much about this on your side