Conversation
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.
주요 내용
질문 & 인사이트
1. 왜 POST 요청은 리소스를 변경함에도 simple request인가?
전통적인 웹의 경우 GET, POST만 지원 및 두 메서드를 기본적인 웹 상호작용으로 간주함. CORS는 이전 브라우저 호환성과 새로운 보안 요구사항 사이의 타협안이기에 기존 웹사이트 동작을 크게 방해하지 않으면서 보안을 강화하는 방향으로 설계되었음.
crossorigin속성이 포함되는 이유예를 들어 아래와 같은
index.html이 있는 경우,빌드 시 다음과 같이 변환됨.
ES Module은 기본적으로 CORS 검사를 수행하고 모듈 스크립트는 서로 다른 출처에서 로드될 때 CORS 규칙을 따라야함. 또한
crossorigin속성이 있어야만 다른 출처에서 로드된 스크립트의 자세한 오류 정보를 얻을 수 있음. 추가로 모던 웹 애플리케이션에선 코드 스플리팅으로 여러 청크로 나누어 로드하는 경우가 많은데 이때 청크들 간의 CORS 문제를 예방하기 위해 사용됨.