File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { NextResponse } from "next/server" ;
22
33// Better Auth handles authentication via cookies
4- // No middleware protection needed - routes are protected at the page/API level
5- export default function proxy ( ) {
4+ // No proxy protection needed - routes are protected at the page/API level
5+ export function proxy ( ) {
66 return NextResponse . next ( ) ;
77}
88
Original file line number Diff line number Diff line change @@ -31,6 +31,10 @@ export const createAuth = (ctx: GenericCtx<DataModel>) => {
3131 "http://localhost:3000" ,
3232 "http://localhost:3001" ,
3333 process . env . SITE_URL || "" ,
34+ // Also trust www variant of the site URL
35+ ...( process . env . SITE_URL
36+ ? [ process . env . SITE_URL . replace ( "://" , "://www." ) ]
37+ : [ ] ) ,
3438 ] . filter ( Boolean ) ,
3539 emailAndPassword : {
3640 enabled : true ,
You can’t perform that action at this time.
0 commit comments