Skip to content

Commit

Permalink
fix: return if correct
Browse files Browse the repository at this point in the history
  • Loading branch information
atinux committed Feb 18, 2024
1 parent 2cbef5e commit 993639f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/middleware/1.hub-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export default eventHandler(async (event) => {
const hub = useRuntimeConfig().hub
const secretKey = (getHeader(event, 'authorization') || '').split(' ')[1]
if (!secretKey) {
console.log('throw')
throw createError({
statusCode: 403,
message: 'Missing Authorization header'
Expand All @@ -37,6 +36,7 @@ export default eventHandler(async (event) => {
authorization: `Bearer ${secretKey}`
}
})
return
}

throw createError({
Expand Down

0 comments on commit 993639f

Please sign in to comment.