Skip to content

Commit

Permalink
[BE] feat: log 추가 (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
wugawuga authored Aug 2, 2023
1 parent 46b9566 commit 4dcb7a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ public class MemberHandlerInterceptor implements HandlerInterceptor {
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
final HttpSession session = request.getSession();
System.out.println(
"request.getSession().getAttribute(\"member\"))" + request.getSession().getAttribute("member"));
System.out.println("request.getHeader(\"Cookie\")" + request.getHeader("Cookie"));
System.out.println("request.getRequestURL().toString()" + request.getRequestURL().toString());
System.out.println("session.getId() = " + session.getId());
if (session.getAttribute("member") == null) {
throw new IllegalArgumentException("login error");
}
Expand Down
2 changes: 1 addition & 1 deletion backend/src/main/java/com/funeat/common/WebConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public WebConfig(final CustomPageableHandlerMethodArgumentResolver customPageabl
@Override
public void addInterceptors(final InterceptorRegistry registry) {
registry.addInterceptor(authHandlerInterceptor)
.addPathPatterns("/api/products/*/reviews/*");
.addPathPatterns("/api/products/**/reviews/**");
registry.addInterceptor(memberHandlerInterceptor)
.addPathPatterns("/api/members");
}
Expand Down

0 comments on commit 4dcb7a7

Please sign in to comment.