Skip to content

Commit

Permalink
fix: DevTools Database CORS error (nuxt-hub#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw authored Apr 10, 2024
1 parent 163eeb7 commit 9273101
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/runtime/server/api/_hub/database/query.options.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { eventHandler, sendNoContent } from 'h3'
import { requireNuxtHubAuthorization } from '../../../utils/auth'

export default eventHandler(async (event) => {
// only handles CORs for Nuxt DevTools
await requireNuxtHubAuthorization(event)
return sendNoContent(event)
})

0 comments on commit 9273101

Please sign in to comment.