فهرست منبع

Add 'expires' to cookie.

Lee Morgan 1 سال پیش
والد
کامیت
f2b42b1d26
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      controllers/user.js

+ 2 - 1
controllers/user.js

@@ -98,7 +98,8 @@ const setCookie = (res, name, value)=>{
     res.cookie(name, value, {
         httpOnly: true,
         secure: process.env.NODE_ENV === "production",
-        signed: true
+        signed: true,
+        expires: new Date(2050, 12, 12)
     });
 }