Repository navigation
[global] 개발 환경 CSP eval 차단 문제 수정 - #98
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
💡 PR 요약
Content-Security-Policy가eval()을 차단해 발생하던 콘솔 에러를 수정하였습니다.Ingredient에origin·supplier필드를 지원하게 되어 더 이상 유효하지 않은 주석을 정리하였습니다.📋 작업 내용
next.config.ts:NODE_ENV가 개발 환경일 때만script-src에'unsafe-eval'을 추가하도록 수정하였습니다. Next.js 개발 모드(Turbopack)의 HMR·콜스택 복원 기능이eval()을 사용하는데, 기존 CSP가 운영·개발 구분 없이 항상 적용되어 콘솔에eval() is not supported in this environment에러가 발생하고 있었습니다. 운영 환경 CSP는 기존과 동일하게 유지됩니다.src/entities/ingredient/model/types.ts:origin/supplier필드에 달려 있던 "백엔드가 아직 제공하지 않는 필드" 주석을 제거하였습니다.Hololog-Server의CreateIngredientRequest/UpdateIngredientRequest/IngredientResponse등에 두 필드가 실제로 추가된 것을/v3/api-docs스펙으로 확인하였습니다(Hololog-Server#91, PR [auth] 영양사 회원가입 승인 절차 제거 #92 반영 완료). 프론트 코드는 두 필드를 이미 옵셔널로 다루고 있어 별도 로직 변경은 필요하지 않았습니다.🤝 리뷰 시 참고사항
origin/supplier값이 비어 있습니다. 화면에서 개별 수정(PATCH)해야 값이 채워집니다 — 백필은 별도로 진행하지 않았습니다.Content-Security-Policy응답 헤더에'unsafe-eval'이 포함되고 콘솔의eval()에러가 사라지는 것을 확인하였습니다.