Skip to content

Commit

Permalink
Merge pull request #89 from Central-MakeUs/dev
Browse files Browse the repository at this point in the history
[Refactor] api 수정됨에 따라 비인증 경로도 수정
  • Loading branch information
dainnida authored Feb 10, 2025
2 parents ddd2a1f + ecbe3f6 commit 2edff1b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti
.requestMatchers("/swagger-ui/**", "/swagger-ui.html", "/api-docs/**", "/swagger-resources/**").permitAll()
// OAuth2 관련 경로 허용
.requestMatchers("/login/**", "/oauth2/**").permitAll()
// 도서 검색, 사용자 api
.requestMatchers("/books/search", "/users/**").permitAll()
// 도서 검색, 사용자 api, health check
.requestMatchers("/api/books/search", "/api/users/**", "/api/health").permitAll()
.anyRequest().authenticated()
)
.oauth2Login(oauth2 -> oauth2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ protected boolean shouldNotFilter(HttpServletRequest request) {
path.startsWith("/oauth2") ||
path.startsWith("/swagger-ui") ||
path.startsWith("/api-docs") ||
path.startsWith("/books/search")||
path.startsWith("/users");
path.startsWith("/api/books/search") ||
path.startsWith("/api/users") ||
path.startsWith("/api/health");
}

@Override
Expand Down

0 comments on commit 2edff1b

Please sign in to comment.