Skip to content

Commit c27c024

Browse files
committed
fix: exclude url 추가
1 parent 320a3ce commit c27c024

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/main/java/org/myteam/server/global/security/filter/TokenAuthenticationFilter.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ protected void doFilterInternal(HttpServletRequest request, HttpServletResponse
5454
String authorizationHeader = request.getHeader(HEADER_AUTHORIZATION);
5555
String accessToken = jwtProvider.getAccessToken(authorizationHeader);
5656

57+
String path = request.getRequestURI();
58+
log.info("request uri: {}", path);
59+
if (path.startsWith("/actuator/prometheus") || path.startsWith("/actuator/health")) {
60+
log.info("[TokenAuthenticationFilter] 요청 제외 path = {}", path);
61+
filterChain.doFilter(request, response); // 인증 필터 건너뜀
62+
return;
63+
}
64+
5765
log.info("accessToken : " + accessToken);
5866
if (StringUtils.isNotBlank(accessToken)) {
5967
try {

0 commit comments

Comments
 (0)