1.添加白名单接口

This commit is contained in:
2024-10-09 17:20:46 +08:00
parent 3bb5f91c1a
commit 275a07f790
2 changed files with 3 additions and 2 deletions

View File

@@ -37,7 +37,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
protected void configure(HttpSecurity http) throws Exception { protected void configure(HttpSecurity http) throws Exception {
http http
.authorizeRequests() .authorizeRequests()
.antMatchers("/oauth/getPublicKey","/oauth/logout","/auth/getImgCode","/judgeToken/guangZhou","/oauth/autoLogin").permitAll() .antMatchers("/oauth/getPublicKey","/oauth/logout","/auth/getImgCode","/judgeToken/guangZhou","/judgeToken/heBei","/oauth/autoLogin").permitAll()
// @link https://gitee.com/xiaoym/knife4j/issues/I1Q5X6 (接口文档knife4j需要放行的规则) // @link https://gitee.com/xiaoym/knife4j/issues/I1Q5X6 (接口文档knife4j需要放行的规则)
.antMatchers("/webjars/**","/doc.html","/swagger-resources/**","/v2/api-docs").permitAll() .antMatchers("/webjars/**","/doc.html","/swagger-resources/**","/v2/api-docs").permitAll()
.anyRequest().authenticated() .anyRequest().authenticated()

View File

@@ -213,8 +213,9 @@ whitelist:
- /pqs-auth/oauth/autoLogin - /pqs-auth/oauth/autoLogin
- /pqs-auth/auth/getImgCode - /pqs-auth/auth/getImgCode
- /pqs-auth/oauth/getPublicKey - /pqs-auth/oauth/getPublicKey
- /pqs-auth/judgeToken/guangZhou
- /pqs-auth/judgeToken/heBei - /pqs-auth/judgeToken/heBei
- /pqs-auth/judgeToken/guangZhou
- /webjars/** - /webjars/**
- /doc.html - /doc.html
- /swagger-resources/** - /swagger-resources/**