feat: restructure routing and layouts for admin and news sections, update cookie paths
This commit is contained in:
@@ -7,7 +7,7 @@ export const userTokenCookieConfig = createCookie(USER_COOKIES.token, {
|
||||
sameSite: 'lax',
|
||||
secure: process.env.NODE_ENV === 'production',
|
||||
secrets: [process.env.VITE_SALT_KEY || 'default-secret'],
|
||||
path: '/news',
|
||||
path: '/',
|
||||
})
|
||||
|
||||
export const adminTokenCookieConfig = createCookie(ADMIN_COOKIES.token, {
|
||||
|
||||
@@ -4,7 +4,7 @@ export const setUserLogoutHeaders = () => {
|
||||
const responseHeaders = new Headers()
|
||||
responseHeaders.append(
|
||||
'Set-Cookie',
|
||||
`${USER_COOKIES.token}=; Path=/news; HttpOnly; SameSite=Strict; Max-Age=0`,
|
||||
`${USER_COOKIES.token}=; Path=/; HttpOnly; SameSite=Strict; Max-Age=0`,
|
||||
)
|
||||
|
||||
return responseHeaders
|
||||
|
||||
Reference in New Issue
Block a user