jwt 수정중
This commit is contained in:
@@ -39,6 +39,15 @@ public class JwtAuthenticationFilter extends OncePerRequestFilter {
|
||||
filterChain.doFilter(request, response);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean shouldNotFilter(HttpServletRequest request) throws ServletException {
|
||||
String path = request.getServletPath();
|
||||
|
||||
// 여기에 JWT 필터를 타지 않게 할 URL 패턴들 작성
|
||||
return path.startsWith("/api/auth/signin") || path.startsWith("/api/auth/refresh");
|
||||
// 필요하면 "/api/auth/logout" 도 추가
|
||||
}
|
||||
|
||||
private String resolveToken(HttpServletRequest request) {
|
||||
String bearer = request.getHeader("Authorization");
|
||||
if (bearer != null && bearer.startsWith("Bearer ")) {
|
||||
|
||||
Reference in New Issue
Block a user