Whitelist swagger

This commit is contained in:
aditya.chandel
2025-03-08 16:46:07 -07:00
parent 573a7e5dc4
commit 3f3e4b5b70

View File

@@ -39,6 +39,11 @@ public class SecurityConfig {
.requestMatchers("/api/v1/auth/register", "/api/v1/auth/login", "/api/v1/auth/refresh").permitAll()
.requestMatchers("/ws/**").permitAll()
.requestMatchers("/api/v1/books/*/cover").permitAll()
.requestMatchers(
"/swagger-ui/**",
"/v3/api-docs/**",
"/swagger-ui.html"
).permitAll()
.anyRequest().authenticated()
)
.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))