aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/http/headers/content-security-policy/media-src
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/fr/web/http/headers/content-security-policy/media-src
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/fr/web/http/headers/content-security-policy/media-src')
-rw-r--r--files/fr/web/http/headers/content-security-policy/media-src/index.html101
1 files changed, 101 insertions, 0 deletions
diff --git a/files/fr/web/http/headers/content-security-policy/media-src/index.html b/files/fr/web/http/headers/content-security-policy/media-src/index.html
new file mode 100644
index 0000000000..5c8e876be4
--- /dev/null
+++ b/files/fr/web/http/headers/content-security-policy/media-src/index.html
@@ -0,0 +1,101 @@
+---
+title: 'CSP: media-src'
+slug: Web/HTTP/Headers/Content-Security-Policy/media-src
+tags:
+ - CSP
+ - Conten-Security-Policy
+ - Directive
+ - HTTP
+ - Media
+ - Reference
+ - Security
+ - Sécurité
+ - media-src
+ - source
+translation_of: Web/HTTP/Headers/Content-Security-Policy/media-src
+---
+<div>{{HTTPSidebar}}</div>
+
+<p>La directive HTTP {{HTTPHeader("Content-Security-Policy")}} (CSP) <code><strong>media-src</strong></code> spécifie les sources valides pour charger des médias en utilisant des éléments tels que {{HTMLElement("audio")}} et {{HTMLElement("video")}}.</p>
+
+<table class="properties">
+ <tbody>
+ <tr>
+ <th scope="row">Version de CSP</th>
+ <td>1</td>
+ </tr>
+ <tr>
+ <th scope="row">Type de directive</th>
+ <td>{{Glossary("Fetch directive")}}</td>
+ </tr>
+ <tr>
+ <th scope="row">{{CSP("default-src")}} par défaut</th>
+ <td>Oui, si cette directive est absente, l'agent utilisateur consultera la directive <code>default-src</code></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Syntaxe">Syntaxe</h2>
+
+<p>Une ou plusieurs sources peuvent être autorisées pour cette directive :</p>
+
+<pre class="syntaxbox notranslate">Content-Security-Policy: media-src &lt;source&gt;;
+Content-Security-Policy: media-src &lt;source&gt; &lt;source&gt;;
+</pre>
+
+<h3 id="Sources">Sources</h3>
+
+<p>{{page("fr/Web/HTTP/Headers/Content-Security-Policy/connect-src", "Sources")}}</p>
+
+<h2 id="Exemples">Exemples</h2>
+
+<h3 id="Cas_de_violation">Cas de violation</h3>
+
+<p>Soit cet en-tête CSP :</p>
+
+<pre class="brush: bash notranslate">Content-Security-Policy: media-src https://example.com/</pre>
+
+<p>Ces éléments {{HTMLElement("audio")}}, {{HTMLElement("video")}} et {{HTMLElement("track")}} seront bloqués et ne se chargeront pas :</p>
+
+<pre class="brush: html notranslate">&lt;audio src="https://not-example.com/audio"&gt;&lt;/audio&gt;
+
+&lt;video src="https://not-example.com/video"&gt;
+ &lt;track kind="subtitles" src="https://not-example.com/subtitles"&gt;
+&lt;/video&gt;</pre>
+
+<h2 id="Spécifications">Spécifications</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Spécification</th>
+ <th scope="col">Statut</th>
+ <th scope="col">Commentaire</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{specName("CSP 3.0", "#directive-media-src", "media-src")}}</td>
+ <td>{{Spec2('CSP 3.0')}}</td>
+ <td>Inchangé.</td>
+ </tr>
+ <tr>
+ <td>{{specName("CSP 1.1", "#directive-media-src", "media-src")}}</td>
+ <td>{{Spec2('CSP 1.1')}}</td>
+ <td>Définition initiale.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</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.Content-Security-Policy.media-src")}}</p>
+
+<h2 id="Voir_aussi">Voir aussi</h2>
+
+<ul>
+ <li>{{HTTPHeader("Content-Security-Policy")}}</li>
+ <li>{{HTMLElement("audio")}}, {{HTMLElement("video")}} and {{HTMLElement("track")}}</li>
+</ul>