|
@@ -31,13 +31,16 @@ public class RestCorsFilter implements Filter {
|
31
|
"http://10.152.72.7:8181" // 岗检前端Nginx
|
31
|
"http://10.152.72.7:8181" // 岗检前端Nginx
|
32
|
// "*.cnooc.*"
|
32
|
// "*.cnooc.*"
|
33
|
// TODO 打包屏蔽-甲方部署时注释:甲方不需要本地登录功能采用单点登录
|
33
|
// TODO 打包屏蔽-甲方部署时注释:甲方不需要本地登录功能采用单点登录
|
34
|
- , "http://192.168.3.32:81" // 前端开发
|
|
|
|
|
34
|
+// , "http://192.168.3.32:81" // 前端开发
|
35
|
};
|
35
|
};
|
36
|
Set<String> allowedOrigins = new HashSet<>(Arrays.asList(allowDomain));
|
36
|
Set<String> allowedOrigins = new HashSet<>(Arrays.asList(allowDomain));
|
37
|
String originHeader = request.getHeader("Origin");
|
37
|
String originHeader = request.getHeader("Origin");
|
38
|
|
38
|
|
|
|
39
|
+ //前端的头Origin为空时设置为前端Nginx的地址
|
|
|
40
|
+ //前端跳转方式:src/views/postcheck.vue -> window.location.href = `${this.getBaseUrl()}/redirectpostcheck`;
|
39
|
if (StringUtils.isBlank(originHeader)) {
|
41
|
if (StringUtils.isBlank(originHeader)) {
|
40
|
- originHeader = "http://192.168.3.32:81";
|
|
|
|
|
42
|
+// originHeader = "http://192.168.3.32:81";
|
|
|
43
|
+ originHeader = "http://10.152.72.7:8181";
|
41
|
}
|
44
|
}
|
42
|
|
45
|
|
43
|
if (allowedOrigins.contains(originHeader)) {
|
46
|
if (allowedOrigins.contains(originHeader)) {
|