Skip to content

Commit

Permalink
Merge pull request #88 from woowacourse-teams/refactor/#87
Browse files Browse the repository at this point in the history
CORS 설정 수정
  • Loading branch information
ksk0605 authored Jul 25, 2024
2 parents 4e2447c + fd47477 commit a660d09
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions backend/src/main/java/mouda/backend/config/CorsConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;


@Configuration
public class CorsConfig implements WebMvcConfigurer {

@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOrigins("*")
.allowedMethods("*")
.allowedHeaders("*");
.allowedOrigins("http://localhost:8080")
.allowedMethods("GET", "POST", "DELETE", "OPTIONS")
.allowedHeaders("Authorization", "Content-Type")
.allowCredentials(true)
.maxAge(3600);
}
}

0 comments on commit a660d09

Please sign in to comment.