mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
Fix CORS to support credentials for cross-origin auth
This commit is contained in:
1 parent
887f4867ab
commit
ae09fa8492
1 file changed
+2
-1
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user