change route.ts

This commit is contained in:
Randa Firman Putra
2025-12-08 01:52:50 +07:00
parent 92edad08d9
commit 7a181be69b

View File

@@ -88,7 +88,7 @@ export async function POST(request: NextRequest) {
// Set secure session cookie
response.cookies.set('user_session', JSON.stringify(userWithoutPassword), {
httpOnly: true,
secure: process.env.NODE_ENV === 'production',
secure: false, // Set to false to allow HTTP (for Coolify deployment)
sameSite: 'lax',
maxAge: 24 * 60 * 60, // 24 hours
path: '/',