Skip to content

Commit

Permalink
Merge pull request #35 from depromeet/feature/#34
Browse files Browse the repository at this point in the history
[chore][#34]localhost:3000 추가
  • Loading branch information
sejoon00 authored Aug 3, 2024
2 parents 7a6dc9c + 82a628c commit acdc2cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public class WebConfig implements WebMvcConfigurer {
public void addCorsMappings(CorsRegistry registry) {

registry.addMapping("/**")
.allowedOrigins("http://114.70.23.79:8080", "http://localhost:8080", "http://52.65.6.74:8080")
.allowedOrigins("http://114.70.23.79:8080", "http://localhost:8080", "http://52.65.6.74:8080",
"http://localhost:3000")
.allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS")
.allowedHeaders("*")
.allowCredentials(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
public CorsConfigurationSource corsConfigurationSource() {
CorsConfiguration configuration = new CorsConfiguration();
configuration.setAllowedOrigins(
List.of("http://114.70.23.79:8080", "http://localhost:8080", "http://52.65.6.74:8080")); // 허용할 오리진 지정
List.of("http://114.70.23.79:8080", "http://localhost:8080", "http://52.65.6.74:8080",
"http://localhost:3000")); // 허용할 오리진 지정
configuration.addAllowedMethod("*");
configuration.setAllowedHeaders(List.of("*")); // 허용할 헤더
configuration.setAllowCredentials(true);
Expand Down

0 comments on commit acdc2cf

Please sign in to comment.