Which middleware has the bug?
@hono/firebase
What version of the middleware?
^1.4.2
What version of Hono are you using?
^4.12.9
What runtime/platform is your app running on? (with version if possible)
Cloudflare worker
What steps can reproduce the bug?
- BACKEND SETUP
import { Hono } from 'hono'
import { cors } from 'hono/cors'
import { gallaryController } from './modules/gallery/gallery.controller'
import { verifyFirebaseAuth, VerifyFirebaseAuthEnv } from '@hono/firebase-auth'
type AppEnv = {
Bindings: VerifyFirebaseAuthEnv
}
const app = new Hono<AppEnv>().basePath('/api')
app.use(
'*',
cors({
origin: ['http://localhost:1420', 'tauri://localhost'],
allowMethods: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS'],
allowHeaders: ['Content-Type', 'Authorization'],
credentials: true,
}),
)
app.use(
'*',
verifyFirebaseAuth({
projectId: 'dev-something',
}),
)
app.route('/gallery', gallaryController)
export default app
- FRONTEND SETUP
import { auth } from '@/firebase'
import axios from 'axios'
export const backendInstance = axios.create({
baseURL: import.meta.env.VITE_BACKEND_URL || 'http://localhost:8080/api',
})
backendInstance.interceptors.request.use(async (config) => {
if (!auth.currentUser) {
return config
}
const idToken = await auth.currentUser.getIdToken()
config.headers['Authorization'] = `Bearer ${idToken}`
return config
})
function signUploadUrl() {
return backendInstance.get('/gallery')
}
export const galleryService = {
signUploadUrl,
}
What is the expected behavior?
Expect to got 200 OK with json response
What do you see instead?
501 Not Implemented
Additional information
I use wrangler dev --local for runing backend
Which middleware has the bug?
@hono/firebase
What version of the middleware?
^1.4.2
What version of Hono are you using?
^4.12.9
What runtime/platform is your app running on? (with version if possible)
Cloudflare worker
What steps can reproduce the bug?
What is the expected behavior?
Expect to got 200 OK with json response
What do you see instead?
501 Not ImplementedAdditional information
I use
wrangler dev --localfor runing backend