mirror of
https://github.com/kennethnym/freya
synced 2026-06-23 18:05:11 +01:00
fix(backend): add CORS middleware and disable CSRF in dev
- Add CORS middleware for /api/auth/* and global routes - Disable better-auth CSRF origin check when NODE_ENV != production Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
@@ -16,6 +16,9 @@ export function createAuth(db: Database) {
|
||||
provider: "pg",
|
||||
schema,
|
||||
}),
|
||||
advanced: {
|
||||
disableCSRFCheck: process.env.NODE_ENV !== "production",
|
||||
},
|
||||
emailAndPassword: {
|
||||
enabled: true,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user