Skip to content

Commit

Permalink
Merge pull request #20 from WE-ARE-RACCOONS/RAC-82
Browse files Browse the repository at this point in the history
RAC-83 fix : Cors μˆ˜μ •
  • Loading branch information
ywj9811 authored Oct 31, 2023
2 parents 8ca9e2c + 2f0c1bc commit 9a5b069
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ public BCryptPasswordEncoder encodePassword() {
protected SecurityFilterChain config(HttpSecurity http) throws Exception {
http
.csrf(csrf->csrf.disable())
.cors(corsConfigurer ->
corsConfigurer.configurationSource(source())
)
.httpBasic(httpBasic->httpBasic.disable())
.headers((headers) -> headers.frameOptions(HeadersConfigurer.FrameOptionsConfig::disable));
http
Expand Down Expand Up @@ -59,7 +62,7 @@ protected SecurityFilterChain config(HttpSecurity http) throws Exception {
}

@Bean
public CorsConfigurationSource corsConfigurationSource() {
public CorsConfigurationSource source() {
CorsConfiguration configuration = new CorsConfiguration();
configuration.addExposedHeader("Authorization");
configuration.addAllowedOriginPattern("*");
Expand Down

0 comments on commit 9a5b069

Please sign in to comment.