diff --git a/server/middleware/auth.ts b/server/middleware/auth.ts index 9840a97..10e4c00 100644 --- a/server/middleware/auth.ts +++ b/server/middleware/auth.ts @@ -3,6 +3,7 @@ import { jwtVerify } from "jose" export default defineEventHandler(async (event) => { const url = getRequestURL(event) + if (!url.pathname.startsWith("/api")) return if (["JWT_SECRET", "G_CLIENT_ID", "G_CLIENT_SECRET"].find(k => !process.env[k])) { event.context.disabledLogin = true if (["/api/s", "/api/proxy"].every(p => !url.pathname.startsWith(p)))