Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.team.peektime_api.global.auth.JwtAuthenticationEntryPoint;
import com.team.peektime_api.global.auth.jwt.JwtAuthenticationFilter;
import jakarta.servlet.DispatcherType;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand Down Expand Up @@ -32,6 +33,10 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
.sessionManagement(session -> session
.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
.authorizeHttpRequests(auth -> auth
// CompletableFuture 응답(async servlet)의 ASYNC 재디스패치 허용.
// 최초 REQUEST 디스패치에서 이미 인증을 통과한 요청이며,
// JWT 필터(OncePerRequestFilter)는 ASYNC 디스패치를 건너뛰어 인증이 비어 401이 나던 문제 방지
.dispatcherTypeMatchers(DispatcherType.ASYNC).permitAll()
.requestMatchers("/").permitAll()
.requestMatchers("/api/v1/auth/**").permitAll()
.requestMatchers("/internal/**").permitAll()
Expand Down
Loading