From 66ab09396cecb4caf3f1b6803fb97792132fffc6 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期二, 04 四月 2023 09:18:33 +0800
Subject: [PATCH] Merge branch 'wvp-28181-2.0' into main-dev

---
 src/main/java/com/genersoft/iot/vmp/conf/security/WebSecurityConfig.java |   33 +++++++++++++++++----------------
 1 files changed, 17 insertions(+), 16 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 a905e44..96ae6b9 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
@@ -72,22 +72,23 @@
      **/
     @Override
     public void configure(WebSecurity web) {
-
-        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.addAll(userSetting.getInterfaceAuthenticationExcludes());
-        // 鍙互鐩存帴璁块棶鐨勯潤鎬佹暟鎹�
-        web.ignoring().antMatchers(matchers.toArray(new String[0]));
+        if (userSetting.isInterfaceAuthentication()) {
+            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.addAll(userSetting.getInterfaceAuthenticationExcludes());
+            // 鍙互鐩存帴璁块棶鐨勯潤鎬佹暟鎹�
+            web.ignoring().antMatchers(matchers.toArray(new String[0]));
+        }
     }
 
     /**

--
Gitblit v1.8.0