Skip to content

Commit

Permalink
feat: WebConfig 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
yumyeonghan committed Nov 2, 2023
1 parent 5ee9b78 commit 8975f3f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/main/java/coffeemeet/server/common/config/WebConfig.java
Original file line number Diff line number Diff line change
@@ -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("*");
}

}

0 comments on commit 8975f3f

Please sign in to comment.