Merge branch 'dev' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into dev
This commit is contained in:
commit
0b13fc0432
|
@ -0,0 +1,24 @@
|
|||
package com.hzya.frame.webapp.web.corsconfig;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
/**
|
||||
* @author 👻👻👻👻👻👻👻👻👻👻 gjh
|
||||
* @version 1.0
|
||||
* @content
|
||||
* @date 2024-09-14 17:10
|
||||
*/
|
||||
@Configuration
|
||||
public class CorsConfig implements WebMvcConfigurer {
|
||||
|
||||
@Override
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
registry.addMapping("/**")
|
||||
.allowedOrigins("*")
|
||||
.allowedMethods("GET", "POST", "PUT", "DELETE")
|
||||
.allowedHeaders("*")
|
||||
.allowCredentials(true);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue