Skip to content

Commit

Permalink
Be/cors (#102)
Browse files Browse the repository at this point in the history
* chore: 주석 추가

* fix: 잘못된 값 수정

* fix

* fix

* fix
  • Loading branch information
zzawang authored May 31, 2024
1 parent 2d2815a commit a33bbc4
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> 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();
}
Expand Down

0 comments on commit a33bbc4

Please sign in to comment.