| | |
| | | // 可以直接访问的静态数据 |
| | | 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/**") |
| | |
| | | @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() |