Skip to content

Commit

Permalink
fix : actuator url 접근 가능하게 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
oosedus committed Oct 16, 2024
1 parent 47faad9 commit e2aa160
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class SecurityConfig {
private final OAuthLoginFailureHandler oAuthLoginFailureHandler;

private final String[] swaggerUrls = {"/swagger-ui/**", "/v3/**"};
private final String[] authUrls = {"/", "/api/users/register", "/oauth2/authorization/kakao", "/api/token/access-token"};
private final String[] authUrls = {"/", "/api/users/register", "/oauth2/authorization/kakao", "/api/token/access-token", "/actuator/health"};
private final String[] allowedUrls = Stream.concat(Arrays.stream(swaggerUrls), Arrays.stream(authUrls))
.toArray(String[]::new);

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/corecord/dev/common/util/JwtFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected void doFilterInternal(HttpServletRequest request, HttpServletResponse
protected boolean shouldNotFilter(HttpServletRequest request) throws ServletException {
// 특정 경로는 필터링하지 않도록 설정
String path = request.getRequestURI();
return path.startsWith("/oauth2/authorization/kakao") || path.startsWith("/api/users/register") || path.startsWith("/api/token/access-token");
return path.startsWith("/oauth2/authorization/kakao") || path.startsWith("/api/users/register") || path.startsWith("/api/token/access-token") || path.startsWith("/actuator/health");
}

private String resolveToken(HttpServletRequest request) {
Expand Down

0 comments on commit e2aa160

Please sign in to comment.