Skip to content

Commit 6dce6dd

Browse files
authored
Merge pull request #24 from SOPT-all/feat/#23
[feat] CORS
2 parents 5927481 + 4a38fdb commit 6dce6dd

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package com.sopkathon.global.config;
2+
3+
import org.springframework.context.annotation.Configuration;
4+
import org.springframework.web.servlet.config.annotation.CorsRegistry;
5+
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
6+
7+
@Configuration
8+
public class WebConfig implements WebMvcConfigurer {
9+
10+
@Override
11+
public void addCorsMappings(CorsRegistry corsRegistry) {
12+
corsRegistry.addMapping("/**")
13+
.allowedOrigins("*")
14+
.allowedMethods("*");
15+
}
16+
}

0 commit comments

Comments
 (0)