Skip to content

Commit 90b141f

Browse files
committed
#49 Setting: add cors configuration
1 parent 3ffef13 commit 90b141f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package com.memesphere.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 CorsMvcConfig implements WebMvcConfigurer {
9+
10+
@Override
11+
public void addCorsMappings(CorsRegistry corsRegistry) {
12+
corsRegistry.addMapping("/**")
13+
.allowedOrigins("http://localhost:3000", "http://15.164.103.195");
14+
}
15+
}

0 commit comments

Comments
 (0)