Pre Merge pull request !244 from tanoak/master
This commit is contained in:
commit
0ff1ed5e5e
2
pom.xml
2
pom.xml
@ -43,7 +43,7 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>2.2.13.RELEASE</version>
|
||||
<version>2.4.6</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
@ -13,6 +13,9 @@ import com.ruoyi.common.config.RuoYiConfig;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.framework.interceptor.RepeatSubmitInterceptor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 通用配置
|
||||
*
|
||||
@ -53,7 +56,9 @@ public class ResourcesConfig implements WebMvcConfigurer
|
||||
CorsConfiguration config = new CorsConfiguration();
|
||||
config.setAllowCredentials(true);
|
||||
// 设置访问源地址
|
||||
config.addAllowedOrigin("*");
|
||||
List<String> patterns = new ArrayList<>();
|
||||
patterns.add("*");
|
||||
config.setAllowedOriginPatterns(patterns);
|
||||
// 设置访问源请求头
|
||||
config.addAllowedHeader("*");
|
||||
// 设置访问源请求方法
|
||||
|
Loading…
x
Reference in New Issue
Block a user