Skip to content

Commit

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

* fix: 잘못된 값 수정

* fix
  • Loading branch information
zzawang authored May 31, 2024
1 parent 2b8d276 commit dc1f947
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import io.jsonwebtoken.Claims;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.util.Iterator;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.servlet.HandlerInterceptor;
Expand All @@ -19,6 +20,16 @@ public boolean preHandle(HttpServletRequest request, HttpServletResponse respons
throws Exception {
String authorization = request.getHeader("Authorization");
String accessToken = jwtUtil.extractJwtToken(authorization);
Iterator<String> headerNames = request.getHeaderNames().asIterator();
while ((headerNames.hasNext())) {
String next = headerNames.next();
String header = request.getHeader(next);
log.info("header - {}", header);
}

log.info("bearer - {}", request.getHeader("Bearer"));
log.info("authorization - {}", authorization);
log.info("accessToken - {}", accessToken);

log.info("bearer - {}", request.getHeader("Bearer"));
log.info("authorization - {}", authorization);
Expand Down

0 comments on commit dc1f947

Please sign in to comment.