This commit is contained in:
2024-01-02 18:59:34 +08:00
parent 7e6cebdaa2
commit 48d399d11c
6 changed files with 115 additions and 1 deletions

View File

@@ -109,7 +109,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
// 过滤请求
.authorizeRequests()
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
.antMatchers("/login", "/register", "/captchaImage", "/subject/project/*").anonymous()
.antMatchers("/login", "/register", "/captchaImage", "/subject/project/*","/subject/**").anonymous()
// 静态资源,可匿名访问
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()