Rework pagination and cookies

This commit is contained in:
Aaron William Po
2023-03-19 18:04:13 -04:00
parent 6b12cb72c5
commit cf6a8309f1
7 changed files with 53 additions and 50 deletions

View File

@@ -8,7 +8,7 @@ export const MAX_AGE = 60 * 60 * 8; // 8 hours
export function setTokenCookie(res: NextApiResponse, token: string) {
const cookie = serialize(TOKEN_NAME, token, {
maxAge: MAX_AGE,
httpOnly: true,
httpOnly: false,
secure: process.env.NODE_ENV === 'production',
path: '/',
sameSite: 'lax',