mirror of
https://github.com/nicotsx/zerobyte.git
synced 2026-05-19 14:08:24 -04:00
chore(better-auth): disable origin check if no trusted origins are passed
This commit is contained in:
@@ -22,7 +22,10 @@ export type AuthMiddlewareContext = MiddlewareContext<MiddlewareOptions, AuthCon
|
||||
const createBetterAuth = (secret: string) =>
|
||||
betterAuth({
|
||||
secret,
|
||||
trustedOrigins: config.trustedOrigins ?? ["*"],
|
||||
trustedOrigins: config.trustedOrigins,
|
||||
advanced: {
|
||||
disableOriginCheck: !config.trustedOrigins,
|
||||
},
|
||||
onAPIError: {
|
||||
throw: true,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user