cloudfront - deptno/deptno.github.io GitHub Wiki

cloudfront

error

Access to XMLHttpRequest at 'https://XXX.com' from origin 'https://YYY.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

ν•΄λ‹Ή λ©”μ‹œμ§€μ—μ„œ 받은 μ‘λ‹΅μ½”λ“œλŠ” 200 μ΄μ—ˆλ‹€. ν•΄λ‹Ή μ²˜λ¦¬λŠ” s3 μ—μ„œ cors 에 도메인 μ£Όμž… ν›„ cf invalidation 처리λ₯Ό ν•œλ‹€.

응닡이 μ—†λŠ” 경우

cors κ΄€λ ¨ν•΄μ„œ λ°œμƒν•œ 문제둜 safari μ—μ„œλŠ” μ‘λ‹΅μ½”λ“œκ°€ μ‘΄μž¬ν•˜μ§€ μ•Šκ³ , ν¬λ‘¬μ—μ„œλŠ” 403이 λ–¨μ–΄μ§€λŠ”λ“± 일관적이지 μ•Šμ„ 수 μžˆλ‹€. OPTIONS 을 받을 수 μžˆλ„λ‘ GET, HEAD, OPTIONS μ΄μƒμ˜ μ˜΅μ…˜μ„ μ„ νƒν•œλ‹€.

link