Commit 28d74d07ac9861a0ac1c688b536652e915bcb155
1 parent
c64ba58c
【代码优化】调整 swagger 的安全配置
Showing
1 changed file
with
2 additions
and
4 deletions
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/security/config/SecurityConfiguration.java
| @@ -24,11 +24,9 @@ public class SecurityConfiguration { | @@ -24,11 +24,9 @@ public class SecurityConfiguration { | ||
| 24 | public void customize(AuthorizeHttpRequestsConfigurer<HttpSecurity>.AuthorizationManagerRequestMatcherRegistry registry) { | 24 | public void customize(AuthorizeHttpRequestsConfigurer<HttpSecurity>.AuthorizationManagerRequestMatcherRegistry registry) { |
| 25 | // Swagger 接口文档 | 25 | // Swagger 接口文档 |
| 26 | registry.requestMatchers("/v3/api-docs/**").permitAll() | 26 | registry.requestMatchers("/v3/api-docs/**").permitAll() |
| 27 | - .requestMatchers("/swagger-ui.html").permitAll() | ||
| 28 | - .requestMatchers("/swagger-ui/**").permitAll() | ||
| 29 | - .requestMatchers("/swagger-resources/**").permitAll() | ||
| 30 | .requestMatchers("/webjars/**").permitAll() | 27 | .requestMatchers("/webjars/**").permitAll() |
| 31 | - .requestMatchers("/*/api-docs").permitAll(); | 28 | + .requestMatchers("/swagger-ui.html").permitAll() |
| 29 | + .requestMatchers("/swagger-ui/**").permitAll(); | ||
| 32 | // Spring Boot Actuator 的安全配置 | 30 | // Spring Boot Actuator 的安全配置 |
| 33 | registry.requestMatchers("/actuator").permitAll() | 31 | registry.requestMatchers("/actuator").permitAll() |
| 34 | .requestMatchers("/actuator/**").permitAll(); | 32 | .requestMatchers("/actuator/**").permitAll(); |