Skip to content

Commit

Permalink
[refactor] : CorsConfig 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
chahyunsoo committed May 9, 2024
1 parent 69dba66 commit 91cf602
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/seoul/gonggong/global/config/CorsConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;

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

@Configuration
public class CorsConfig {
Expand All @@ -15,7 +16,7 @@ public CorsFilter corsFilter() {
UrlBasedCorsConfigurationSource urlBasedCorsConfigurationSource = new UrlBasedCorsConfigurationSource();
CorsConfiguration configuration = new CorsConfiguration();
configuration.setAllowCredentials(true);
configuration.setAllowedOrigins("http://localhost:3000");
configuration.setAllowedOrigins(Collections.singletonList("http://localhost:3000"));
configuration.addAllowedHeader("*");
configuration.setAllowedMethods(Arrays.asList("HEAD", "GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"));

Expand Down

0 comments on commit 91cf602

Please sign in to comment.