Skip to content

Commit

Permalink
fix :permit 복구
Browse files Browse the repository at this point in the history
  • Loading branch information
dltjdgh0428 committed Mar 28, 2024
1 parent b5a1dd1 commit 06f31f1
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ public BCryptPasswordEncoder encoder() {
public CorsConfigurationSource corsConfigurationSource() {
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
CorsConfiguration config = new CorsConfiguration();
// 구체적인 출처 지정
config.setAllowedOrigins(Arrays.asList("https://www.bookeverywhere.site","http://localhost:3000"));
// 또는 패턴을 사용하여 출처 지정
config.setAllowedOriginPatterns(Arrays.asList("https://*.bookeverywhere.site","http://localhost:3000"));
config.setAllowCredentials(true); // 크리덴셜 허용
Expand All @@ -63,9 +61,9 @@ public SecurityFilterChain filterChain(HttpSecurity http, HandlerMappingIntrospe
.requestMatchers(new MvcRequestMatcher(introspector, "/")).permitAll()
.requestMatchers(new MvcRequestMatcher(introspector, "/health")).permitAll()
.requestMatchers(new MvcRequestMatcher(introspector, "/env")).permitAll()
.requestMatchers(new MvcRequestMatcher(introspector, "/swagger-ui/**")).permitAll()
// .requestMatchers(new MvcRequestMatcher(introspector, "/api/**")).hasAuthority("ROLE_MEMBER")
.requestMatchers(new MvcRequestMatcher(introspector, "/api/**")).authenticated()
.requestMatchers(new MvcRequestMatcher(introspector, "/**")).permitAll()
.requestMatchers(new MvcRequestMatcher(introspector, "/api/**")).permitAll()
.anyRequest().authenticated()
)
.oauth2Login(oauth2Login ->
Expand Down

0 comments on commit 06f31f1

Please sign in to comment.