change cookies
This commit is contained in:
@@ -64,7 +64,7 @@ let intervalId:any
|
||||
// Navigation guard to check authentication state
|
||||
router.beforeEach((to, from, next) => {
|
||||
// Check the session cookie
|
||||
const sessionCookie = document.cookie.split(';').find(cookie => cookie.trim().startsWith('session='))
|
||||
const sessionCookie = document.cookie.split(';').find(cookie => cookie.trim().startsWith('s-ui='))
|
||||
const isAuthenticated = !!sessionCookie
|
||||
|
||||
// If the route requires authentication and the user is not authenticated, redirect to /login
|
||||
|
||||
Reference in New Issue
Block a user