Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
개요프록시 서비스 설정에서 활성 프록시를 CORSProxy.io에서 AllOrigins로 변경했습니다. 기존 CORSProxy.io 구현은 주석 처리되었으며, AllOrigins의 buildUrl 및 extractHtml 구현이 활성화되었습니다. 변경 사항
예상 코드 리뷰 노력🎯 1 (Trivial) | ⏱️ ~3분 추천 레이블
추천 검토자
토끼의 시
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Storybook chromatic 배포 확인: |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@apps/client/src/shared/utils/fetchOgData.ts`:
- Around line 73-85: The JSDoc above the CORS proxy configurations is outdated
because only the AllOrigins entry (name: 'AllOrigins', buildUrl, extractHtml)
remains active; update the JSDoc text (around the comment block that used to
describe trying multiple CORS proxies) to a concise description like "Fetches OG
data via a CORS proxy (AllOrigins)" or "CORS 프록시를 통해 OG 데이터를 가져옵니다", and remove
the part that says it will try multiple proxies simultaneously so the comment
accurately reflects the current AllOrigins implementation.
🧹 Nitpick comments (1)
apps/client/src/shared/utils/fetchOgData.ts (1)
88-91: JSDoc 주석이 현재 구현과 불일치주석에 "여러 CORS 프록시를 동시에 시도"라고 되어 있지만, 현재는 AllOrigins 단일 프록시만 사용하고 있습니다. 주석을 현재 구현에 맞게 업데이트하면 좋겠습니다.
📝 주석 수정 제안
/** * 주어진 URL에서 OG 데이터를 가져옵니다. - * 여러 CORS 프록시를 동시에 시도하여 가장 먼저 성공한 결과를 사용합니다. + * CORS 프록시를 통해 OG 데이터를 가져옵니다. */
| // { | ||
| // name: 'AllOrigins', | ||
| // name: 'CORSProxy.io', | ||
| // buildUrl: (targetUrl: string) => | ||
| // `https://api.allorigins.win/get?url=${encodeURIComponent(targetUrl)}`, | ||
| // extractHtml: (response: AxiosResponse) => response.data?.contents, | ||
| // `https://corsproxy.io/?${encodeURIComponent(targetUrl)}`, | ||
| // extractHtml: (response: AxiosResponse) => response.data, | ||
| // }, | ||
| // TODO: 2개까지 보낼 필요 없어서 일단 주석처리 | ||
| { | ||
| name: 'AllOrigins', | ||
| buildUrl: (targetUrl: string) => | ||
| `https://api.allorigins.win/get?url=${encodeURIComponent(targetUrl)}`, | ||
| extractHtml: (response: AxiosResponse) => response.data?.contents, | ||
| }, |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cd /tmp && find . -name "fetchOgData.ts" -type f 2>/dev/null | head -20Repository: Pinback-Team/pinback-client
Length of output: 53
🏁 Script executed:
git ls-files | grep -i fetchogdataRepository: Pinback-Team/pinback-client
Length of output: 114
🏁 Script executed:
find . -path "*/client/src/shared/utils/fetchOgData.ts" -type fRepository: Pinback-Team/pinback-client
Length of output: 116
🏁 Script executed:
fd "fetchOgData.ts"Repository: Pinback-Team/pinback-client
Length of output: 114
🏁 Script executed:
cat -n apps/client/src/shared/utils/fetchOgData.ts 2>/dev/null || find . -name "fetchOgData.ts" -exec cat -n {} \;Repository: Pinback-Team/pinback-client
Length of output: 4395
🏁 Script executed:
#!/bin/bash
# Test AllOrigins API with a simple example URL
TEST_URL="https://example.com"
echo "Testing AllOrigins API response structure..."
curl -s "https://api.allorigins.win/get?url=${TEST_URL}" | head -c 1000
echo -e "\n---\nChecking response fields..."
curl -s "https://api.allorigins.win/get?url=${TEST_URL}" | jq 'keys' 2>/dev/null || echo "jq parsing failed or service unavailable"Repository: Pinback-Team/pinback-client
Length of output: 839
AllOrigins API 검증 완료 - JSDoc 수정 필요
AllOrigins API(api.allorigins.win)는 정상적으로 작동하며, 응답 형식이 예상대로 contents 필드를 포함하고 있습니다. 코드의 response.data?.contents 추출 로직이 정확합니다.
다만 88-91줄의 JSDoc 주석이 이제 정확하지 않습니다. 현재는 AllOrigins 하나만 활성화되어 있으므로 "여러 CORS 프록시를 동시에 시도"라는 설명을 "CORS 프록시를 통해 OG 데이터를 가져옵니다" 등으로 수정하세요.
🤖 Prompt for AI Agents
In `@apps/client/src/shared/utils/fetchOgData.ts` around lines 73 - 85, The JSDoc
above the CORS proxy configurations is outdated because only the AllOrigins
entry (name: 'AllOrigins', buildUrl, extractHtml) remains active; update the
JSDoc text (around the comment block that used to describe trying multiple CORS
proxies) to a concise description like "Fetches OG data via a CORS proxy
(AllOrigins)" or "CORS 프록시를 통해 OG 데이터를 가져옵니다", and remove the part that says it
will try multiple proxies simultaneously so the comment accurately reflects the
current AllOrigins implementation.
📌 Related Issues
📄 Tasks
⭐ PR Point (To Reviewer)
📷 Screenshot
Summary by CodeRabbit
릴리즈 노트
✏️ Tip: You can customize this high-level summary in your review settings.