We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d98fbf6 + ce2bffd commit 66a4f91Copy full SHA for 66a4f91
2 files changed
src/main/java/com/aiary/be/global/util/SessionUtil.java
@@ -11,6 +11,8 @@ public class SessionUtil{
11
public static void setUserSession(HttpServletRequest request, UserResponse user) {
12
HttpSession session = request.getSession();
13
session.setAttribute("loggedInUser", user);
14
+
15
+ session.setMaxInactiveInterval(30 * 60);
16
}
17
18
// 세션을 무효화(로그아웃)
src/main/resources/application.yaml
@@ -2,7 +2,7 @@ server:
2
port: ${SPRING_PORT}
3
servlet:
4
session:
5
- timeout: 1800 # 세션 만료 시간 (1800s, 30m)
+ timeout: 3600 # 세션 만료 시간 (3600s, 1h)
6
cookie:
7
name: JSESSIONID # 세션 쿠키 이름 (기본값)
8
http-only: true # JavaScript에서 쿠키 접근 불가 (XSS 방어)
0 commit comments