Fix CORS to support credentials for cross-origin auth

This commit is contained in:
Chris Scott committed 2026-01-24 18:29:16 -05:00
1 parent 887f4867ab
commit ae09fa8492
1 file changed
+2 -1
+2 -1
View File
@@ -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)