blob: bd959a91db67038cd3a2440ba3704855f1bc4c0b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
---
title: 'CSP: img-src'
slug: Web/HTTP/Headers/Content-Security-Policy/img-src
translation_of: Web/HTTP/Headers/Content-Security-Policy/img-src
---
<div>{{HTTPSidebar}}</div>
<p>The HTTP {{HTTPHeader("Content-Security-Policy")}}<code>:</code> <code><strong>img</strong></code><strong><code>-src</code></strong> 지시어는 이미지 및 파비콘에 대하여 유효한 출처를 지정합니다.</p>
<table class="properties">
<tbody>
<tr>
<th scope="row">CSP version</th>
<td>1</td>
</tr>
<tr>
<th scope="row">Directive type</th>
<td>{{Glossary("Fetch directive")}}</td>
</tr>
<tr>
<th scope="row">{{CSP("default-src")}} fallback</th>
<td>Yes. If this directive is absent, the user agent will look for the <code>default-src</code> directive.</td>
</tr>
</tbody>
</table>
<h2 id="Syntax">Syntax</h2>
<p><code>img-src</code> 정책에 대해 하나 이상의 출처를 허용 할 수 있습니다.</p>
<pre class="syntaxbox">Content-Security-Policy: img-src <source>;
Content-Security-Policy: img-src <source> <source>;
</pre>
<h3 id="Sources">Sources</h3>
<p>{{page("Web/HTTP/Headers/Content-Security-Policy/default-src", "Sources")}}</p>
<h2 id="Examples">Examples</h2>
<h3 id="Violation_cases">Violation cases</h3>
<p>CSP 헤더가 주어질 때:</p>
<pre class="brush: bash">Content-Security-Policy: img-src https://example.com/</pre>
<p>아래의 {{HTMLElement("img")}} 태그가 차단되어 불러오지 않습니다:</p>
<pre class="brush: html"><img src="https://not-example.com/foo.jpg" alt="example picture"></pre>
<h2 id="Specifications">Specifications</h2>
<table class="standard-table">
<tbody>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
<tr>
<td>{{specName("CSP 3.0", "#directive-img-src", "img-src")}}</td>
<td>{{Spec2('CSP 3.0')}}</td>
<td>No changes.</td>
</tr>
<tr>
<td>{{specName("CSP 1.1", "#directive-img-src", "img-src")}}</td>
<td>{{Spec2('CSP 1.1')}}</td>
<td>Initial definition.</td>
</tr>
</tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>
<p>{{Compat("http.headers.csp.img-src")}}</p>
<h2 id="See_also">See also</h2>
<ul>
<li>{{HTTPHeader("Content-Security-Policy")}}</li>
<li>{{HTMLElement("img")}}</li>
</ul>
|