diff --git a/app.js b/app.js index 937f5c05da96e28f4af7c063270a5e67151b116a..b749726aca097bb0d4ea1ea7de173fbc42a93da1 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 ce50caf5463a7095f3516a27fc14c7a0c114f7f4..41b5cf97f0fbf47bfdbdf98da94444f3a81e4660 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;