diff --git a/src/main/java/coffeemeet/server/common/config/WebConfig.java b/src/main/java/coffeemeet/server/common/config/WebConfig.java new file mode 100644 index 00000000..1316b1d4 --- /dev/null +++ b/src/main/java/coffeemeet/server/common/config/WebConfig.java @@ -0,0 +1,18 @@ +package coffeemeet.server.common.config; + +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.CorsRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +@Configuration +public class WebConfig implements WebMvcConfigurer { + + @Override + public void addCorsMappings(CorsRegistry registry) { + registry.addMapping("/**") + .allowedOrigins("*") + .allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS") + .allowedHeaders("*"); + } + +}