Skip to content

Commit

Permalink
fix: 쿠키 도메인 설정 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
dy102 committed Dec 9, 2023
1 parent 5592a3c commit 3c52fa7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,16 +183,16 @@ public Cookie addViewCountByCookie(HttpServletRequest request, Long postId) {
if (oldCookie != null) {
if (!oldCookie.getValue().contains("[" + postId + "]")) {
oldCookie.setValue(oldCookie.getValue() + "[" + postId + "]");
oldCookie.setDomain("15.164.221.35:3000");
oldCookie.setPath("/");
oldCookie.setHttpOnly(false);
addViewCount(postId);
}
return oldCookie;
}

Cookie newCookie = new Cookie(VIEW_COOKIE_NAME, "[" + postId + "]");
newCookie.setDomain("15.164.221.35:3000");
newCookie.setPath("/");
newCookie.setHttpOnly(false);
addViewCount(postId);
return newCookie;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ public Cookie addVisitCountByCookie(HttpServletRequest request, Long blogId) {
if (oldCookie != null) {
if (!oldCookie.getValue().contains("[" + blogId + "]")) {
oldCookie.setValue(oldCookie.getValue() + "[" + blogId + "]");
oldCookie.setDomain("15.164.221.35:3000");
oldCookie.setPath("/");
oldCookie.setHttpOnly(false);
addVisitCount(blogId);
}
return oldCookie;
}

Cookie newCookie = new Cookie(VISIT_COOKIE_NAME, "[" + blogId + "]");
newCookie.setDomain("15.164.221.35:3000");
newCookie.setPath("/");
newCookie.setHttpOnly(false);
addVisitCount(blogId);
return newCookie;
}
Expand Down

0 comments on commit 3c52fa7

Please sign in to comment.