add public swagger ui

This commit is contained in:
EgorAnti
2026-10-20 13:41:32 +03:00
parent f0ec586777
commit 05fcccb9ed
2 changed files with 9 additions and 0 deletions
@@ -77,6 +77,11 @@ public class SecurityConfig {
.authenticationEntryPoint(bearerAuthenticationEntryPoint))
.authorizeHttpRequests(authorize -> authorize
.requestMatchers(HttpMethod.GET, "/health/**").permitAll()
.requestMatchers(
"/swagger-ui.html",
"/swagger-ui/**",
"/v3/api-docs/**"
).permitAll()
.requestMatchers(HttpMethod.POST, "/api/v1/users").permitAll()
.anyRequest().authenticated())
.addFilterBefore(apiAuthenticationFilter, AnonymousAuthenticationFilter.class);