Skip to content

Commit

Permalink
[mod] #227 cors 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
gustjdw committed Feb 13, 2024
1 parent 13c5015 commit 56e97e0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/com/dmarket/config/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.springframework.web.cors.CorsConfigurationSource;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;

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

Expand Down Expand Up @@ -133,6 +134,7 @@ private CorsConfigurationSource corsConfiguration() {

configuration.setAllowedOrigins(Collections.singletonList("http://localhost:3000"));
configuration.setAllowedOriginPatterns(corsPath); //2024-02-02 수정
configuration.setAllowedOriginPatterns(Arrays.asList("http://localhost*", "https://localhost*", "http://172.16.210*", "https://172.16.210*", "http://172.30.3.55*", "https://172.30.3.55*", "http://dmarketmall*", "https://dmarketmall*", "http://61.109.214.63*", "https://61.109.214.63*"));
configuration.setAllowedMethods(Collections.singletonList("*"));
configuration.setAllowCredentials(true);
configuration.setAllowedHeaders(Collections.singletonList("*"));
Expand Down

0 comments on commit 56e97e0

Please sign in to comment.