This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

Fetch 지시어 (Fetch directive)

CSP fetch 지시어는 특정 리소스 유형이 로드될 수 있는 Content-Security-Policy 헤더 및 제어 위치에 사용됩니다. 예를 들어, script-src는 개발자가 신뢰할 수 있는 스크립트 소스가 페이지에서 실행되도록 허용하는 반면, font-src는 웹 글꼴 소스를 제어합니다.

모든 fetch 지시문은 default-src으로 대체됩니다. 즉, CSP 헤더에 fetch 지시어가 없으면 사용자 에이전트는 default-src 지시어를 찾습니다.

전체 목록은 Fetch 지시어 목록을 참고해주세요.