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 | 24 | public void customize(AuthorizeHttpRequestsConfigurer<HttpSecurity>.AuthorizationManagerRequestMatcherRegistry registry) { |
| 25 | 25 | // Swagger 接口文档 |
| 26 | 26 | registry.requestMatchers("/v3/api-docs/**").permitAll() |
| 27 | - .requestMatchers("/swagger-ui.html").permitAll() | |
| 28 | - .requestMatchers("/swagger-ui/**").permitAll() | |
| 29 | - .requestMatchers("/swagger-resources/**").permitAll() | |
| 30 | 27 | .requestMatchers("/webjars/**").permitAll() |
| 31 | - .requestMatchers("/*/api-docs").permitAll(); | |
| 28 | + .requestMatchers("/swagger-ui.html").permitAll() | |
| 29 | + .requestMatchers("/swagger-ui/**").permitAll(); | |
| 32 | 30 | // Spring Boot Actuator 的安全配置 |
| 33 | 31 | registry.requestMatchers("/actuator").permitAll() |
| 34 | 32 | .requestMatchers("/actuator/**").permitAll(); | ... | ... |