diff --git a/src/main/java/org/withtime/be/withtimebe/global/util/CookieUtil.java b/src/main/java/org/withtime/be/withtimebe/global/util/CookieUtil.java index 1df0dfa..96eb7f4 100644 --- a/src/main/java/org/withtime/be/withtimebe/global/util/CookieUtil.java +++ b/src/main/java/org/withtime/be/withtimebe/global/util/CookieUtil.java @@ -25,9 +25,11 @@ public static void addCookie(HttpServletRequest request, HttpServletResponse res public static String getCookie(HttpServletRequest request, String name) { Cookie[] cookies = request.getCookies(); - for (Cookie cookie : cookies) { - if (cookie.getName().equals(name)) { - return cookie.getValue(); + if (cookies != null) { + for (Cookie cookie : cookies) { + if (cookie.getName().equals(name)) { + return cookie.getValue(); + } } } return null;