feat #32 : 허용 출처 설정 및 CORS Preflight 문제 해결#72
Merged
andrewkimswe merged 2 commits intodevelopfrom Feb 14, 2025
Merged
Conversation
3 tasks
andrewkimswe
requested changes
Feb 14, 2025
Member
andrewkimswe
left a comment
There was a problem hiding this comment.
🚨 Conflicting files가 있습니다.
🔹 .gradle/buildOutputCleanup/buildOutputCleanup.lock
🔹 .gradle/file-system.probe
파일 충돌을 해결한 후 다시 push 해주세요.
그리고 curl이나 브라우저 네트워크 콘솔을 통해 Preflight 요청(OPTIONS) 응답이 정상적으로 오는지 점검하셨나요? 제가 pull 후, curl로 OPTIONS 요청을 테스트했을 때 200 응답이 오지 않아서요...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
개요
Spring Security 및 CORS 설정을 개선하여 보안을 강화하고, CORS Preflight 문제를 해결함.
PR 유형
어떤 변경 사항이 있나요?
변경 사항
SecurityConfig클래스에서 CORS 설정을 수정하여 프론트엔드에서만 접근 가능하도록 제한setMaxAge(3600L)추가하여 CORS Preflight 요청을 캐싱하도록 설정requestMatchers(HttpMethod.OPTIONS, "/**").permitAll()추가하여 OPTIONS 요청을 허용하고,HttpMethod를 importsetAllowedOrigins(List.of("https://presentalk.store", "https://app.presentalk.store"))로 허용된 도메인 명확하게 지정permitAll()범위를 줄여 보안 강화PR Checklist
PR이 다음 요구 사항을 충족하는지 확인하세요.