648540858
2023-04-03 3dfbc843adf2d4b6affd3d1d14684941a09561fb
src/main/java/com/genersoft/iot/vmp/conf/security/WebSecurityConfig.java
@@ -72,10 +72,7 @@
     **/
    @Override
    public void configure(WebSecurity web) {
        if (!userSetting.isInterfaceAuthentication()) {
            web.ignoring().antMatchers("**");
        }else {
        if (userSetting.isInterfaceAuthentication()) {
            ArrayList<String> matchers = new ArrayList<>();
            matchers.add("/");
            matchers.add("/#/**");
@@ -86,6 +83,8 @@
            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]));