From 1912498b85cef16031f4d8348e3d8ac727f92150 Mon Sep 17 00:00:00 2001
From: tpgus2603 <kakaneymar2424@gmail.com>
Date: Tue, 3 Dec 2024 21:47:57 +0900
Subject: [PATCH] =?UTF-8?q?=ED=94=84=EB=A1=A0=ED=8A=B8=EC=97=90=EC=84=9C?=
 =?UTF-8?q?=20=EC=83=9D=EA=B8=B0=EB=8A=94=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20?=
 =?UTF-8?q?=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 app.js                          | 22 ++++++++++++++--------
 controllers/friendController.js |  2 +-
 2 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/app.js b/app.js
index 937f5c0..b749726 100644
--- a/app.js
+++ b/app.js
@@ -25,21 +25,27 @@ app.use(
     credentials: true,
   })
 );
-
-
-// 誘몃뱾�⑥뼱 �ㅼ젙
-app.use(express.json());
-app.use(express.urlencoded({ extended: false }));
-
-// �몄뀡 �ㅼ젙
+// 
 app.use(
   session({
-    secret: 'your_session_secret', 
+    secret: 'your-secret-key',
     resave: false,
     saveUninitialized: false,
+    rolling: true,
+    cookie: {
+      httpOnly: true,
+      secure: false, 
+      maxAge: 60 * 60 * 1000, // 1�쒓컙
+      sameSite: 'lax', 
+    },
   })
 );
 
+
+// 誘몃뱾�⑥뼱 �ㅼ젙
+app.use(express.json());
+app.use(express.urlencoded({ extended: false }));
+
 // Passport 珥덇린�� 諛� �몄뀡 �곌껐
 app.use(passport.initialize());
 app.use(passport.session());
diff --git a/controllers/friendController.js b/controllers/friendController.js
index ce50caf..41b5cf9 100644
--- a/controllers/friendController.js
+++ b/controllers/friendController.js
@@ -4,7 +4,7 @@ const { User } = require('../models');
 class friendController {
         /**
          * 移쒓뎄 �붿껌 蹂대궡湲�
-         * �대씪�댁뼵�몃뒗 userId�� �붿껌�� 蹂대궪 �ъ슜�먯쓽 email�� �꾩넚
+         * �대씪�댁뼵�몃뒗 userId�� �붿껌�� 蹂대궪 �ъ슜�먯쓽 email�� body�먯쟾��
          */
         async sendFriendRequest(req, res, next) {
             const { userId, email } = req.body;
-- 
GitLab