From 3432548c1a7eeac6ecfc71916ba34ae76cf32412 Mon Sep 17 00:00:00 2001
From: 64850858 <648540858@qq.com>
Date: 星期一, 28 六月 2021 15:54:50 +0800
Subject: [PATCH] 修复用户更新sql错误,ffmpeg拉流代理超时时间错误

---
 src/main/java/com/genersoft/iot/vmp/conf/security/WebSecurityConfig.java |   30 ++++++++++++++++++++----------
 1 files changed, 20 insertions(+), 10 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 ebeefd4..fd7383b 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
@@ -1,5 +1,6 @@
 package com.genersoft.iot.vmp.conf.security;
 
+import com.genersoft.iot.vmp.conf.UserSetup;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
@@ -20,6 +21,9 @@
 @EnableWebSecurity
 @EnableGlobalMethodSecurity(prePostEnabled = true)
 public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
+
+    @Autowired
+    private UserSetup userSetup;
 
     @Autowired
     private DefaultUserDetailsServiceImpl userDetailsService;
@@ -66,16 +70,22 @@
      **/
     @Override
     public void configure(WebSecurity web) {
-        // 鍙互鐩存帴璁块棶鐨勯潤鎬佹暟鎹�
-        web.ignoring()
-                .antMatchers("/")
-                .antMatchers("/static/**")
-                .antMatchers("/index.html")
-                .antMatchers("/doc.html") // "/webjars/**", "/swagger-resources/**", "/v3/api-docs/**"
-                .antMatchers("/webjars/**")
-                .antMatchers("/swagger-resources/**")
-                .antMatchers("/v3/api-docs/**")
-                .antMatchers("/js/**");
+
+        if (!userSetup.isInterfaceAuthentication()) {
+            web.ignoring().antMatchers("**");
+        }else {
+            // 鍙互鐩存帴璁块棶鐨勯潤鎬佹暟鎹�
+            web.ignoring()
+                    .antMatchers("/")
+                    .antMatchers("/#/**")
+                    .antMatchers("/static/**")
+                    .antMatchers("/index.html")
+                    .antMatchers("/doc.html") // "/webjars/**", "/swagger-resources/**", "/v3/api-docs/**"
+                    .antMatchers("/webjars/**")
+                    .antMatchers("/swagger-resources/**")
+                    .antMatchers("/v3/api-docs/**")
+                    .antMatchers("/js/**");
+        }
     }
 
     /**

--
Gitblit v1.8.0