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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
---
title: 'CSP: object-src'
slug: Web/HTTP/Headers/Content-Security-Policy/object-src
tags:
- CSP
- Content-Security-Policy
- Directive
- HTTP
- Object
- Reference
- Security
- object-src
- source
- セキュリティ
- ディレクティブ
translation_of: Web/HTTP/Headers/Content-Security-Policy/object-src
---
<div>{{HTTPSidebar}}</div>
<p>HTTP の {{HTTPHeader("Content-Security-Policy")}} の <code><strong>object-src</strong></code> ディレクティブは、 {{HTMLElement("object")}}, {{HTMLElement("embed")}}, {{HTMLElement("applet")}} の各要素の妥当なソースを指定します。</p>
<p>{{HTMLElement("object")}}, {{HTMLElement("embed")}}, {{HTMLElement("applet")}} の各要素の許可される種類を設定するには、 {{CSP("plugin-types")}} ディレクティブを使用してください。</p>
<p class="note"><code>object-src</code> で制御される要素は、おそらく偶然にも古い HTML 要素と見なされており、新しい標準機能が搭載されていません (<code><iframe></code> の <code>sandbox</code> や <code>allow</code> などのセキュリティ属性など)。したがって、このフェッチディレクティブで制限することを<a href="https://csp.withgoogle.com/docs/strict-csp.html">推奨します</a> (例えば、可能であれば明示的に <code>object-src 'none'</code> を設定するなど)。</p>
<table class="properties">
<tbody>
<tr>
<th scope="row">CSP バージョン</th>
<td>1</td>
</tr>
<tr>
<th scope="row">ディレクティブ種別</th>
<td>{{Glossary("Fetch directive", "フェッチディレクティブ")}}</td>
</tr>
<tr>
<th scope="row">{{CSP("default-src")}} による代替</th>
<td>あり。このディレクティブがない場合、ユーザーエージェントは <code>default-src</code> ディレクティブを探します。</td>
</tr>
</tbody>
</table>
<h2 id="Syntax" name="Syntax">構文</h2>
<p>object-src ポリシーには、1つまたは複数のソースが許可されています。</p>
<pre class="syntaxbox">Content-Security-Policy: object-src <source>;
Content-Security-Policy: object-src <source> <source>;
</pre>
<h3 id="Sources" name="Sources">ソース</h3>
<p>{{page("/ja/docs/Web/HTTP/Headers/Content-Security-Policy/connect-src", "Sources")}}</p>
<h2 id="Examples" name="Examples">例</h2>
<h3 id="Violation_case" name="Violation_case">違反例</h3>
<p>この CSP ヘッダーがある場合、</p>
<pre class="brush: bash">Content-Security-Policy: object-src https://example.com/</pre>
<p>以下の {{HTMLElement("object")}}, {{HTMLElement("embed")}}, {{HTMLElement("applet")}} の各要素はブロックされ、読み込まれません。</p>
<pre class="brush: html"><embed src="https://not-example.com/flash"></embed>
<object data="https://not-example.com/plugin"></object>
<applet archive="https://not-example.com/java"></applet></pre>
<h2 id="Specifications" name="Specifications">仕様書</h2>
<table class="standard-table">
<thead>
<tr>
<th scope="col">仕様書</th>
<th scope="col">状態</th>
<th scope="col">備考</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{specName("CSP 3.0", "#directive-object-src", "object-src")}}</td>
<td>{{Spec2('CSP 3.0')}}</td>
<td>変更なし</td>
</tr>
<tr>
<td>{{specName("CSP 1.1", "#directive-object-src", "object-src")}}</td>
<td>{{Spec2('CSP 1.1')}}</td>
<td>初回定義</td>
</tr>
</tbody>
</table>
<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2>
<p>{{Compat("http.headers.csp.Content-Security-Policy.object-src")}}</p>
<h2 id="See_also" name="See_also">関連情報</h2>
<ul>
<li>{{HTTPHeader("Content-Security-Policy")}}</li>
<li>{{HTMLElement("object")}}, {{HTMLElement("embed")}}, and {{HTMLElement("applet")}}</li>
<li>{{CSP("plugin-types")}}</li>
</ul>
|