From 99d498e9a09d863934d10bec4798bc7cd401d1e6 Mon Sep 17 00:00:00 2001 From: Yuri Lee Date: Mon, 8 Sep 2025 00:58:13 +0900 Subject: [PATCH] =?UTF-8?q?FU-365=20feat:=20shouldNotFilter=EC=97=90=20?= =?UTF-8?q?=ED=97=AC=EC=8A=A4=EC=B2=B4=ED=81=AC=20=EA=B2=BD=EB=A1=9C=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 헬스체크 경로는 TOKEN 검사 하지 않도록 --- src/main/java/com/foru/freebe/config/SecurityConfig.java | 2 +- .../com/foru/freebe/jwt/filter/JwtAuthenticationFilter.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/foru/freebe/config/SecurityConfig.java b/src/main/java/com/foru/freebe/config/SecurityConfig.java index c6d20a38..af888077 100644 --- a/src/main/java/com/foru/freebe/config/SecurityConfig.java +++ b/src/main/java/com/foru/freebe/config/SecurityConfig.java @@ -37,7 +37,7 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti .addFilterBefore(jwtExceptionFilter, LogoutFilter.class) .authorizeHttpRequests((request) -> request - .requestMatchers("/actuator/health", "/actuator/health/**").permitAll() + .requestMatchers("/actuator/health").permitAll() .requestMatchers("/photographer/join").hasAnyRole("PHOTOGRAPHER_PENDING") .requestMatchers("/photographer/**").hasAnyRole("PHOTOGRAPHER") .requestMatchers("/customer/product/**").permitAll() diff --git a/src/main/java/com/foru/freebe/jwt/filter/JwtAuthenticationFilter.java b/src/main/java/com/foru/freebe/jwt/filter/JwtAuthenticationFilter.java index 4e93301c..7bdfd6c0 100644 --- a/src/main/java/com/foru/freebe/jwt/filter/JwtAuthenticationFilter.java +++ b/src/main/java/com/foru/freebe/jwt/filter/JwtAuthenticationFilter.java @@ -38,6 +38,7 @@ protected boolean shouldNotFilter(HttpServletRequest request) throws ServletExce matchers.add(new AntPathRequestMatcher("/customer/notice/**")); matchers.add(new AntPathRequestMatcher("/login/**")); matchers.add(new AntPathRequestMatcher("/reissue")); + matchers.add(new AntPathRequestMatcher("/actuator/health")); return matchers.stream() .anyMatch((matcher -> matcher.matches(request)));