fix: disable trusted origins validation

This commit is contained in:
2026-03-31 04:55:03 -07:00
parent 39e7573e76
commit 31c93de81a
+2 -8
View File
@@ -17,14 +17,8 @@ export const auth = betterAuth({
}, },
secret: process.env.BETTER_AUTH_SECRET, secret: process.env.BETTER_AUTH_SECRET,
baseURL: process.env.BETTER_AUTH_URL || "http://localhost:3000", baseURL: process.env.BETTER_AUTH_URL || "http://localhost:3000",
trustedOrigins: [ // Disable trusted origins validation
"http://dhg.lol:51193", trustedOrigins: [],
"http://localhost:3000",
"http://127.0.0.1:3000",
"http://0.0.0.0:3000",
// Parse comma-separated TRUSTED_ORIGINS environment variable
...(process.env.TRUSTED_ORIGINS ? process.env.TRUSTED_ORIGINS.split(',').map((origin) => origin.trim()) : []),
],
session: { session: {
cookieCache: { cookieCache: {
enabled: false, // Disable cookie cache to avoid session cache issues enabled: false, // Disable cookie cache to avoid session cache issues