From 8a590d5c39f0f8bb1a4bfab427deb9483f780f4b Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期四, 30 三月 2023 09:01:36 +0800
Subject: [PATCH] Merge pull request #800 from yjkhtddx/wvp-28181-2.0
---
src/main/java/com/genersoft/iot/vmp/conf/security/WebSecurityConfig.java | 35 +++++++++++++++++------------------
1 files changed, 17 insertions(+), 18 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/conf/security/WebSecurityConfig.java b/src/main/java/com/genersoft/iot/vmp/conf/security/WebSecurityConfig.java
index be2850f..0f75984 100644
--- a/src/main/java/com/genersoft/iot/vmp/conf/security/WebSecurityConfig.java
+++ b/src/main/java/com/genersoft/iot/vmp/conf/security/WebSecurityConfig.java
@@ -73,23 +73,22 @@
@Override
public void configure(WebSecurity web) {
- if (!userSetting.isInterfaceAuthentication()) {
- web.ignoring().antMatchers("**");
- }else {
- ArrayList<String> matchers = new ArrayList<>();
- matchers.add("/");
- matchers.add("/#/**");
- matchers.add("/static/**");
- matchers.add("/index.html");
- matchers.add("/doc.html");
- matchers.add("/webjars/**");
- matchers.add("/swagger-resources/**");
- matchers.add("/v3/api-docs/**");
- matchers.add("/js/**");
- matchers.addAll(userSetting.getInterfaceAuthenticationExcludes());
- // 鍙互鐩存帴璁块棶鐨勯潤鎬佹暟鎹�
- web.ignoring().antMatchers(matchers.toArray(new String[0]));
- }
+ ArrayList<String> matchers = new ArrayList<>();
+ matchers.add("/");
+ matchers.add("/#/**");
+ matchers.add("/static/**");
+ matchers.add("/index.html");
+ matchers.add("/doc.html");
+ matchers.add("/webjars/**");
+ matchers.add("/swagger-resources/**");
+ matchers.add("/v3/api-docs/**");
+ matchers.add("/js/**");
+ matchers.add("/api/device/query/snap/**");
+ matchers.add("/record_proxy/*/**");
+ matchers.add("/zlm_Proxy/FhTuMYqB2HeCuNOb/record/t/1/2023-03-25/16:35:07-16:35:16-9353.mp4");
+ matchers.addAll(userSetting.getInterfaceAuthenticationExcludes());
+ // 鍙互鐩存帴璁块棶鐨勯潤鎬佹暟鎹�
+ web.ignoring().antMatchers(matchers.toArray(new String[0]));
}
/**
@@ -122,7 +121,7 @@
.authorizeRequests()
.requestMatchers(CorsUtils::isPreFlightRequest).permitAll()
.antMatchers(userSetting.getInterfaceAuthenticationExcludes().toArray(new String[0])).permitAll()
- .antMatchers("/api/user/login","/index/hook/**").permitAll()
+ .antMatchers("/api/user/login","/index/hook/**","/zlm_Proxy/FhTuMYqB2HeCuNOb/record/t/1/2023-03-25/16:35:07-16:35:16-9353.mp4").permitAll()
.anyRequest().authenticated()
// 寮傚父澶勭悊鍣�
.and()
--
Gitblit v1.8.0