panlinlin
2021-04-19 41ca4e938d63027931447ebe343f47366194cac2
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()