From aebebc4730dc9efdea62179708386faa3cbe9581 Mon Sep 17 00:00:00 2001 From: Parkjyun Date: Sat, 12 Oct 2024 12:26:57 +0900 Subject: [PATCH] =?UTF-8?q?[feat]=20=EB=91=98=EB=9F=AC=EB=B3=B4=EA=B8=B0?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80=EB=A5=BC=20=EC=9C=84=ED=95=9C=20whiteList?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hankki/hankkiserver/auth/config/SecurityConfig.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/hankki/hankkiserver/auth/config/SecurityConfig.java b/src/main/java/org/hankki/hankkiserver/auth/config/SecurityConfig.java index 1b0d5b6a..a71b996e 100644 --- a/src/main/java/org/hankki/hankkiserver/auth/config/SecurityConfig.java +++ b/src/main/java/org/hankki/hankkiserver/auth/config/SecurityConfig.java @@ -25,7 +25,9 @@ public class SecurityConfig { private final JwtValidator jwtValidator; private final JwtProvider jwtProvider; - private static final String[] whiteList = {"/api/v1/auth/login", "/api/v1/auth/reissue", "/actuator/health"}; + private static final String[] authWhiteList = {"/api/v1/auth/login", "/api/v1/auth/reissue", "/actuator/health"}; + private static final String[] businessLogicWhileList = {"/api/v1/stores/categories", "/api/v1/stores/sort-options", "/api/v1/stores/price-categories", + "/api/v1/stores", "/api/v1/stores/pins", "/api/v1/stores/{articleId:\\d+}/thumbnail", "/api/v1/universities"}; @Bean public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { @@ -50,6 +52,8 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { @Bean public WebSecurityCustomizer webSecurityCustomizer() { - return web -> web.ignoring().requestMatchers(whiteList); + return web -> web.ignoring() + .requestMatchers(authWhiteList) + .requestMatchers(businessLogicWhileList); } }