--- title: 'CSP: img-src' slug: Web/HTTP/Headers/Content-Security-Policy/img-src translation_of: Web/HTTP/Headers/Content-Security-Policy/img-src ---
The HTTP {{HTTPHeader("Content-Security-Policy")}}: img-src 지시어는 이미지 및 파비콘에 대하여 유효한 출처를 지정합니다.
| CSP version | 1 |
|---|---|
| Directive type | {{Glossary("Fetch directive")}} |
| {{CSP("default-src")}} fallback | Yes. If this directive is absent, the user agent will look for the default-src directive. |
img-src 정책에 대해 하나 이상의 출처를 허용 할 수 있습니다.
Content-Security-Policy: img-src <source>; Content-Security-Policy: img-src <source> <source>;
<source> can be any one of the values listed in CSP Source Values.
Note that this same set of values can be used in all {{Glossary("fetch directive", "fetch directives")}} (and a number of other directives).
CSP 헤더가 주어질 때:
Content-Security-Policy: img-src https://example.com/
아래의 {{HTMLElement("img")}} 태그가 차단되어 불러오지 않습니다:
<img src="https://not-example.com/foo.jpg" alt="example picture">
| Specification | Status | Comment |
|---|---|---|
| {{specName("CSP 3.0", "#directive-img-src", "img-src")}} | {{Spec2('CSP 3.0')}} | No changes. |
| {{specName("CSP 1.1", "#directive-img-src", "img-src")}} | {{Spec2('CSP 1.1')}} | Initial definition. |
{{Compat("http.headers.csp.img-src")}}