update the domains

This commit is contained in:
root
2026-05-16 16:51:59 -04:00
parent 4408f7cc8f
commit 7e4fb6d62a
9 changed files with 50 additions and 44 deletions
+2 -1
View File
@@ -11,7 +11,8 @@ function localJwtMiddleware(req: NextRequest): NextResponse {
// Check for employee_token cookie (set on login) OR allow if coming from sign-in
const token = req.cookies.get('employee_token')?.value
if (!token) {
const signInUrl = new URL('/sign-in', req.url)
const signInUrl = req.nextUrl.clone()
signInUrl.pathname = '/sign-in'
signInUrl.searchParams.set('redirect', req.nextUrl.pathname)
return NextResponse.redirect(signInUrl)
}