panlinlin
2021-04-22 a29a0a0785f966294ba01982fba62c1ff0f23bea
src/main/java/com/genersoft/iot/vmp/conf/security/WebSecurityConfig.java
@@ -69,9 +69,7 @@
        // 可以直接访问的静态数据
        web.ignoring()
                .antMatchers("/")
                .antMatchers("/css/**")
                .antMatchers("/img/**")
                .antMatchers("/fonts/**")
                .antMatchers("/static/**")
                .antMatchers("/index.html")
                .antMatchers("/doc.html") // "/webjars/**", "/swagger-resources/**", "/v3/api-docs/**"
                .antMatchers("/webjars/**")
@@ -100,6 +98,8 @@
    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http.cors().and().csrf().disable();
        // 设置允许添加静态文件
        http.headers().contentTypeOptions().disable();
        http.authorizeRequests()
                // 放行接口
                .antMatchers("/api/user/login","/index/hook/**").permitAll()