Repository navigation
fix: 피드 CORS 커스텀 정책으로 교체 — no-cache 요청 시 CORS 헤더 누락 해결 - #41
Open
serithemage wants to merge 1 commit into
Open
serithemage wants to merge 1 commit into
serithemage wants to merge 1 commit into
Conversation
spot.roboco.io 대시보드에서 data.json fetch가 CORS로 차단됐다. 관리형 CORS-AllowAllOrigins 정책은 요청에 Cache-Control: no-cache가 있으면 access-control-allow-origin을 붙이지 않았고, fetch의 cache:'no-store'가 이 헤더를 보낸다. - 피드 CloudFront: 커스텀 ResponseHeadersPolicy(origin *, originOverride) - index.html: cache:'no-store' 제거 (신선도는 분 단위 ?t= 쿼리로 확보) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🔆 CodeSolar review ✅ Looks good
대시보드 feed fetch 시 CloudFront 관리형 CORS 정책이 no-cache 요청에서 헤더를 누락하는 문제를 해결하기 위해, 커스텀 ResponseHeadersPolicy(originOverride: true)로 교체하고 대시보드 측에서 cache:'no-store'를 제거한 PR. 변경은 정확하며 테스트도 적절히 업데이트됨.
✅ No issues worth flagging.
solar-pro4 (openrouter) · 3 files · +29/-5 · 117.9s · CodeSolar
Comment /codesolar on this PR to re-run the review.
This branch has not been 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.
문제
https://spot.roboco.io대시보드에서Failed to load data.json: TypeError: Failed to fetch가 발생했다. Chrome 콘솔에는No 'Access-Control-Allow-Origin' header가 찍혔다.원인
관리형 응답 헤더 정책
CORS-AllowAllOrigins를 쓰면, 요청에Cache-Control: no-cache가 있을 때 CloudFront 응답에서access-control-allow-origin이 빠졌다(curl로 재현). 대시보드의fetch(..., {cache:'no-store'})가 이 헤더를 보낸다. 기존 CloudFront 대시보드는 같은 출처에서 요청해서 CORS 검사가 없었기 때문에 이 문제가 드러나지 않았다.변경
ResponseHeadersPolicy(허용 출처*,originOverride: true)로 교체assets/dashboard/index.html:cache:'no-store'제거. 신선도는 1분마다 바뀌는?t=쿼리로 확보한다.검증 (2026-10-12, 수집기 스택은 이 브랜치로 이미 배포됨)
Origin+Cache-Control: no-cache요청 → 200 +access-control-allow-origin: *https://spot.roboco.io렌더링 → CORS 오류 0건, 데이터 로드 확인/,/index.html→https://spot.roboco.io로 301 (PR feat: 대시보드를 GitHub Pages(spot.roboco.io)로 이전 #40 리다이렉트 반영)npm test,npm run build통과🤖 Generated with Claude Code