Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/main/java/org/example/crm/config/JwtFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public class JwtFilter extends OncePerRequestFilter {
@Override
protected boolean shouldNotFilter(HttpServletRequest request) {
String path = request.getServletPath();
return path.startsWith("/api/v1/auth")
return path.startsWith("/api/v1/auth/login")
|| path.startsWith("/api/v1/auth/refresh-token")
|| path.startsWith("/v3/api-docs")
|| path.startsWith("/swagger-ui");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected boolean shouldNotFilter(HttpServletRequest request) throws ServletExce
return true;
}

// 2. Bypass Swagger UI, OpenAPI docs, and static web assets
// 2. Bypass Swagger UI, OpenAPI docs, static web assets, and auth endpoints
return path.startsWith("/v3/api-docs")
|| path.startsWith("/swagger-ui")
|| path.endsWith(".css")
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/example/crm/config/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public class SecurityConfig {
private String frontUrl;

private final String[] WHITE_LIST = new String[]{
"/api/v1/auth/**",
"/api/v1/auth/login",
"/api/v1/auth/refresh-token",
"/v3/api-docs/**",
"/v3/api-docs",
"/swagger-ui/**",
Expand Down