Skip to content

Commit

Permalink
Merge pull request #34 from pknu-wap/Fix/#30
Browse files Browse the repository at this point in the history
fix: jwt 필터가 스웨거를 차단하지 않도록 변경
  • Loading branch information
Zepelown authored Nov 28, 2024
2 parents 8a818fb + dbc21fa commit 69be782
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ class JwtAuthenticationFilter(
response: HttpServletResponse,
filterChain: FilterChain
) {
val path = request.requestURI
if (path.startsWith("/swagger-ui/") || path.startsWith("/v3/api-docs/")) {
filterChain.doFilter(request, response)
return
}

val token = parseBearerToken(request)

if (token != null && jwtTokenProvider.validateTokenAndGetSubject(token) != null) {
Expand Down

0 comments on commit 69be782

Please sign in to comment.