Skip to content

Commit

Permalink
fix : corsConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
sycuuui committed Apr 19, 2024
1 parent 7a20ec1 commit dc14a87
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/com/capic/server/global/config/CorsConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
// CORS 허용, CSRF 비활성화
http.cors(Customizer.withDefaults())
.csrf(AbstractHttpConfigurer::disable);
http.sessionManagement((session) -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS));

http.authorizeHttpRequests((authorize) ->
authorize.requestMatchers( "/api-docs/**", "/swagger-ui/**", "/swagger-ui.html").permitAll()
.anyRequest().permitAll());
return http.build();
}
/**
Expand Down

0 comments on commit dc14a87

Please sign in to comment.