Skip to content

Commit cad0bcc

Browse files
committed
v0:ref: modify apiKeyAuthMiddleware to skip unauthorized response and proceed to next auth method
1 parent 721c46e commit cad0bcc

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

apps/workers/v0/src/middlewares/api-key-auth.hono.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,13 @@ export const apiKeyAuthMiddleware = createMiddleware<AppBindings>(
2121

2222
if (!apiKey) {
2323
logDebug(c.env, '🔑 No API key provided, skipping to next auth method');
24-
return c.json(
25-
{ success: false, error: 'Unauthorized: No API key provided' },
26-
401,
27-
);
24+
// return c.json(
25+
// { success: false, error: 'Unauthorized: No API key provided' },
26+
// 401,
27+
// );
28+
29+
// skip to next auth method
30+
return next();
2831
}
2932

3033
try {

0 commit comments

Comments
 (0)