Skip to content

Commit 66a4f91

Browse files
authored
Merge pull request #38 from TeamAiary/refactor/code-reading-and-refactoring
Refactor : code reading and refactoring
2 parents d98fbf6 + ce2bffd commit 66a4f91

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/main/java/com/aiary/be/global/util/SessionUtil.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ public class SessionUtil{
1111
public static void setUserSession(HttpServletRequest request, UserResponse user) {
1212
HttpSession session = request.getSession();
1313
session.setAttribute("loggedInUser", user);
14+
15+
session.setMaxInactiveInterval(30 * 60);
1416
}
1517

1618
// 세션을 무효화(로그아웃)

src/main/resources/application.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ server:
22
port: ${SPRING_PORT}
33
servlet:
44
session:
5-
timeout: 1800 # 세션 만료 시간 (1800s, 30m)
5+
timeout: 3600 # 세션 만료 시간 (3600s, 1h)
66
cookie:
77
name: JSESSIONID # 세션 쿠키 이름 (기본값)
88
http-only: true # JavaScript에서 쿠키 접근 불가 (XSS 방어)

0 commit comments

Comments
 (0)