diff --git a/backend/shareNote/src/main/java/com/Backend/shareNote/domain/Jwt/JWTFilter.java b/backend/shareNote/src/main/java/com/Backend/shareNote/domain/Jwt/JWTFilter.java index 836aa0e0..3fb4c9dd 100644 --- a/backend/shareNote/src/main/java/com/Backend/shareNote/domain/Jwt/JWTFilter.java +++ b/backend/shareNote/src/main/java/com/Backend/shareNote/domain/Jwt/JWTFilter.java @@ -23,7 +23,9 @@ @Slf4j public class JWTFilter extends OncePerRequestFilter { private final JWTUtil jwtUtil; - private final List permitAllUrls = List.of("/api/user/login", "/api/user/signUp", "/", "/api/user/reissue", "/api/user/cookieToJwt"); + + private final List permitAllUrls = List.of("/api/user/login", "/api/user/signUp", "/", "/api/user/reissue", + "/api/user/cookieToJwt","/user/uniqueEmail/**","/user/uniqueNickname/**","/swagger-ui.html","/api/user/organization/invitation/accept"); @Override protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException { String requestURI = request.getRequestURI(); diff --git a/backend/shareNote/src/main/java/com/Backend/shareNote/domain/config/SecurityConfig.java b/backend/shareNote/src/main/java/com/Backend/shareNote/domain/config/SecurityConfig.java index 20b20db1..4006f8fa 100644 --- a/backend/shareNote/src/main/java/com/Backend/shareNote/domain/config/SecurityConfig.java +++ b/backend/shareNote/src/main/java/com/Backend/shareNote/domain/config/SecurityConfig.java @@ -108,9 +108,9 @@ public CorsConfiguration getCorsConfiguration(HttpServletRequest request) { // 경로별 인가 작업 http .authorizeHttpRequests((auth -> auth - .requestMatchers("/api/user/login","/","/api/user/signUp").permitAll() + .requestMatchers("/api/user/login","/","/api/user/signUp","/api/user/organization/invitation/accept").permitAll() .requestMatchers("/admin").hasRole("ADMIN") - .requestMatchers("/api/user/reissue","/api/user/cookieToJwt").permitAll() + .requestMatchers("/api/user/reissue","/api/user/cookieToJwt","/user/uniqueEmail/**","/user/uniqueNickname/**","/swagger-ui.html","/user/reissue").permitAll() .anyRequest().authenticated()) ); http.addFilterAfter(new JWTFilter(jwtUtil), OAuth2LoginAuthenticationFilter.class);