From e2d0152e5f6d75a8aa754376d330716b383319e8 Mon Sep 17 00:00:00 2001 From: Ou Date: Sun, 3 Nov 2024 20:10:43 +0800 Subject: [PATCH] fix: reloading of sites deployed with Docker or Node.js --- server/middleware/auth.ts | 1 + 1 file changed, 1 insertion(+) 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)))