fix(firebase-auth): retrive header values for v4 (#393)

pull/394/head
Kei Kamikawa 2024-02-15 19:02:01 +09:00 committed by GitHub
parent 3fdf755ed6
commit 7e36ecc3f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 2 deletions

View File

@ -0,0 +1,5 @@
---
'@hono/firebase-auth': patch
---
- supported v4 to get header values

View File

@ -1 +0,0 @@
module.exports = require('../../jest.config.js')

View File

@ -43,7 +43,7 @@ export const verifyFirebaseAuth = (userConfig: VerifyFirebaseAuthConfig): Middle
} }
return async (c, next) => { return async (c, next) => {
const authorization = c.req.headers.get(config.AuthorizationHeaderKey) const authorization = c.req.raw.headers.get(config.AuthorizationHeaderKey)
if (authorization === null) { if (authorization === null) {
const res = new Response('Bad Request', { const res = new Response('Bad Request', {
status: 400, status: 400,