diff --git a/be/issue-tracker/src/main/java/com/issuetracker/global/interceptor/JwtInterceptor.java b/be/issue-tracker/src/main/java/com/issuetracker/global/interceptor/JwtInterceptor.java index 8e078b50c..50971d49f 100644 --- a/be/issue-tracker/src/main/java/com/issuetracker/global/interceptor/JwtInterceptor.java +++ b/be/issue-tracker/src/main/java/com/issuetracker/global/interceptor/JwtInterceptor.java @@ -48,6 +48,22 @@ public boolean preHandle(HttpServletRequest request, HttpServletResponse respons log.info("authorization - {}", authorization); log.info("accessToken - {}", accessToken); + log.info("Method - {}", request.getMethod()); + if (request.getMethod().equals(HttpMethod.OPTIONS.name())) { + return true; + } + + Iterator headerNames = request.getHeaderNames().asIterator(); + while ((headerNames.hasNext())) { + String next = headerNames.next(); + String header = request.getHeader(next); + log.info("{} header - {}", next, header); + } + + log.info("bearer - {}", request.getHeader("Bearer")); + log.info("authorization - {}", authorization); + log.info("accessToken - {}", accessToken); + if (accessToken == null) { throw new UnauthorizedException(); }