fix: 프로덕션 환경에서는 특정 Origin만 참조하도록 수정 #79
Merged
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.
주요 변경 사항
프로덕션 환경에서는 특정 origin만 CORS가 허용되도록 수정합니다.
변경 이유
axios에서
withCredentials
를 통해 쿠키와 함께 요청을 보내면, 서버의 응답 헤더에서Access-Control-Allow-Origin
의 값에 와일드카드를 사용하는 경우 보안 문제로 CORS 에러를 일으킵니다. 따라서, 프로덕션 환경에서는 특정 도메인만 허용하도록 합니다.