1
|
package eu.dnetlib.uoaauthorizationlibrary.security;
|
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.WebMvcConfigurerAdapter;
|
6
|
|
7
|
@Configuration
|
8
|
public class CorsConfig extends WebMvcConfigurerAdapter {
|
9
|
|
10
|
@Override
|
11
|
public void addCorsMappings(CorsRegistry registry) {
|
12
|
registry.addMapping("/**")
|
13
|
.allowedMethods("GET", "POST", "PUT", "DELETE", "HEAD", "OPTIONS")
|
14
|
.allowCredentials(true);
|
15
|
}
|
16
|
}
|