We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e5092ac + d9e0633 commit df7e1cfCopy full SHA for df7e1cf
src/main/java/cmf/commitField/global/config/CustomWebMvcConfig.java
@@ -0,0 +1,20 @@
1
+package cmf.commitField.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 CustomWebMvcConfig implements WebMvcConfigurer {
9
+ @Override
10
+ public void addCorsMappings(CorsRegistry registry) {
11
+ registry.addMapping("/**")
12
+ .allowedOrigins(
13
+ AppConfig.getSiteFrontUrl()
14
+ )
15
+ .allowedMethods("*")
16
+ .allowedHeaders("*")
17
+ .allowCredentials(true)
18
+ .maxAge(3600);
19
+ }
20
+}
0 commit comments