1
13693261870
2022-09-16 245ae1f91513a9ab3ee650c9e1926bc46f670653
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package com.landtool.lanbase.config;
 
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
 
/**
 *
 * @author TanBin
 *
 */
@Configuration
public class CORSConfiguration extends WebMvcConfigurerAdapter {
    @Override
    public void addCorsMappings(CorsRegistry registry){
        registry.addMapping("/**")
            .allowedMethods("*")
            .allowedOrigins("*")
            .allowCredentials(true)
            .allowedHeaders("*");
    }
 
}