From ae09fa84928819062e21e919bf2ce7cd50d1c2e5 Mon Sep 17 00:00:00 2001 From: Chris Scott <99081550+chriswritescode-dev@users.noreply.github.com> Date: Sat, 24 Jan 2026 18:29:16 -0500 Subject: [PATCH] Fix CORS to support credentials for cross-origin auth --- backend/src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/index.ts b/backend/src/index.ts index 83134c9e..e66cdefe 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -44,9 +44,10 @@ const DB_PATH = getDatabasePath() const app = new Hono() app.use('/*', cors({ - origin: '*', + origin: (origin) => origin || '*', allowMethods: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS'], allowHeaders: ['Content-Type', 'Authorization'], + credentials: true, })) const db = initializeDatabase(DB_PATH)