Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] 이력서 비로그인 회원 조회 가능 #284

Merged
merged 2 commits into from
Feb 23, 2025
Merged
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 @@ -10,6 +10,7 @@
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpMethod;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
Expand Down Expand Up @@ -64,6 +65,13 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
// .anyRequest().permitAll()
// )
.authorizeHttpRequests(authorize -> authorize

// 특정 엔드포인트에서 GET 요청만 허용
.requestMatchers(HttpMethod.GET,
"/api/v1/resumes",
"/api/v1/resumes/view"
).permitAll()

.requestMatchers(
"/v3/api-docs/**",
"/oauth2/**",
Expand All @@ -75,7 +83,8 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
"/api-docs/**",
"/signup.html",
"/login",
"/api/v1/mock/signup"
"/api/v1/mock/signup",
"/api/v1/resumes/search"
).permitAll()
.anyRequest().authenticated()
)
Expand Down