优化静态文件访问的问题

This commit is contained in:
gy b
2023-09-18 20:45:59 +08:00
parent 04d9172cce
commit f62373675d
2 changed files with 4 additions and 2 deletions
@@ -111,7 +111,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
// 过滤请求
.authorizeRequests()
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
.antMatchers("/login", "/register", "/captchaImage","/home/**").permitAll()
.antMatchers("/login", "/register", "/captchaImage","/uploadPath/**").permitAll()
// 静态资源,可匿名访问
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()