Skip to content

Commit

Permalink
[feat] 둘러보기 추가를 위한 whiteList 추가 (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
Parkjyun authored Oct 12, 2024
1 parent 1b7de3b commit 258966a
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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);
}
}

0 comments on commit 258966a

Please sign in to comment.