Skip to content

Commit

Permalink
chore: filter cors 에러 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
tfer2442 committed Aug 27, 2024
1 parent 6d1f577 commit 3b6543d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.CorsConfigurationSource;

import java.util.Arrays;
import java.util.Collections;

@Configuration
Expand Down Expand Up @@ -50,7 +51,7 @@ public CorsConfiguration getCorsConfiguration(HttpServletRequest request) {

CorsConfiguration configuration = new CorsConfiguration();

configuration.setAllowedOrigins(Collections.singletonList("http://localhost:3000, http://www.knu-haedal.com"));
configuration.setAllowedOrigins(Arrays.asList("http://localhost:3000", "http://www.knu-haedal.com"));
configuration.setAllowedMethods(Collections.singletonList("*"));
configuration.setAllowCredentials(true);
configuration.setAllowedHeaders(Collections.singletonList("*"));
Expand Down

0 comments on commit 3b6543d

Please sign in to comment.