Skip to content

Commit edfa898

Browse files
configure CORS
1 parent 117e51f commit edfa898

File tree

1 file changed

+16
-0
lines changed
  • service/src/main/java/io/github/sergejsvisockis/documentservice/config

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 io.github.sergejsvisockis.documentservice.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.EnableWebMvc;
6+
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
7+
8+
@Configuration
9+
@EnableWebMvc
10+
public class WebMvcConfig implements WebMvcConfigurer {
11+
12+
@Override
13+
public void addCorsMappings(CorsRegistry registry) {
14+
registry.addMapping("/**");
15+
}
16+
}

0 commit comments

Comments
 (0)