From df12ec2617159d79d2ea959389358ef52423f9ff Mon Sep 17 00:00:00 2001 From: julieng Date: Fri, 17 Sep 2021 20:49:55 +0200 Subject: move *.html to *.md --- .../content-security-policy/worker-src/index.html | 98 ---------------------- .../content-security-policy/worker-src/index.md | 98 ++++++++++++++++++++++ 2 files changed, 98 insertions(+), 98 deletions(-) delete mode 100644 files/fr/web/http/headers/content-security-policy/worker-src/index.html create mode 100644 files/fr/web/http/headers/content-security-policy/worker-src/index.md (limited to 'files/fr/web/http/headers/content-security-policy/worker-src') diff --git a/files/fr/web/http/headers/content-security-policy/worker-src/index.html b/files/fr/web/http/headers/content-security-policy/worker-src/index.html deleted file mode 100644 index fd9ee4f21f..0000000000 --- a/files/fr/web/http/headers/content-security-policy/worker-src/index.html +++ /dev/null @@ -1,98 +0,0 @@ ---- -title: 'CSP: worker-src' -slug: Web/HTTP/Headers/Content-Security-Policy/worker-src -tags: - - CSP - - Content-Security-Policy - - Directive - - HTTP - - Reference - - Security - - Sécurité -translation_of: Web/HTTP/Headers/Content-Security-Policy/worker-src ---- -
{{HTTPSidebar}}
- -

La directive HTTP {{HTTPHeader("Content-Security-Policy")}} (CSP) worker-src spécifie les sources valides pour les scripts {{domxref("Worker")}}, {{domxref("SharedWorker")}} et {{domxref("ServiceWorker")}}.

- - - - - - - - - - - - - - - - -
Version de CSP3
Type de directive{{Glossary("Fetch directive")}}
Valeur par défaut -

Si cette directive est absente, l'agent utilisateur consultera d'abord la directive {{CSP("child-src")}}, puis la directive {{CSP("script-src")}} et enfin la directive {{CSP("default-src")}}, concernant la gestion l'exécution des workers.

- -

Chrome 59 et plus ne consultent pas la directive {{CSP("child-src")}}.

- -

Edge 17 ne consulte pas la directive {{CSP("script-src")}} (bug).

-
- -

Syntaxe

- -

Une ou plusieurs sources peuvent être autorisées pour cette directive :

- -
Content-Security-Policy: worker-src <source>;
-Content-Security-Policy: worker-src <source> <source>;
-
- -

Sources

- -

{{page("fr/Web/HTTP/Headers/Content-Security-Policy/connect-src", "Sources")}}

- -

Exemples

- -

Cas de violation

- -

Soit cet en-tête CSP :

- -
Content-Security-Policy: worker-src https://example.com/
- -

{{domxref("Worker")}}, {{domxref("SharedWorker")}} et {{domxref("ServiceWorker")}} seront bloqués et ne se chargeront pas :

- -
<script>
-  var blockedWorker = new Worker("data:application/javascript,...");
-  blockedWorker = new SharedWorker("https://not-example.com/");
-  navigator.serviceWorker.register('https://not-example.com/sw.js');
-</script>
- -

Spécifications

- - - - - - - - - - - - - - - - -
SpécificationStatutCommentaire
{{specName("CSP 3.0", "#directive-worker-src", "worker-src")}}{{Spec2('CSP 3.0')}}Définition initiale.
- -

Compatibilité des navigateurs

- -

{{Compat("http.headers.csp.Content-Security-Policy.worker-src")}}

- -

Voir aussi

- - diff --git a/files/fr/web/http/headers/content-security-policy/worker-src/index.md b/files/fr/web/http/headers/content-security-policy/worker-src/index.md new file mode 100644 index 0000000000..fd9ee4f21f --- /dev/null +++ b/files/fr/web/http/headers/content-security-policy/worker-src/index.md @@ -0,0 +1,98 @@ +--- +title: 'CSP: worker-src' +slug: Web/HTTP/Headers/Content-Security-Policy/worker-src +tags: + - CSP + - Content-Security-Policy + - Directive + - HTTP + - Reference + - Security + - Sécurité +translation_of: Web/HTTP/Headers/Content-Security-Policy/worker-src +--- +
{{HTTPSidebar}}
+ +

La directive HTTP {{HTTPHeader("Content-Security-Policy")}} (CSP) worker-src spécifie les sources valides pour les scripts {{domxref("Worker")}}, {{domxref("SharedWorker")}} et {{domxref("ServiceWorker")}}.

+ + + + + + + + + + + + + + + + +
Version de CSP3
Type de directive{{Glossary("Fetch directive")}}
Valeur par défaut +

Si cette directive est absente, l'agent utilisateur consultera d'abord la directive {{CSP("child-src")}}, puis la directive {{CSP("script-src")}} et enfin la directive {{CSP("default-src")}}, concernant la gestion l'exécution des workers.

+ +

Chrome 59 et plus ne consultent pas la directive {{CSP("child-src")}}.

+ +

Edge 17 ne consulte pas la directive {{CSP("script-src")}} (bug).

+
+ +

Syntaxe

+ +

Une ou plusieurs sources peuvent être autorisées pour cette directive :

+ +
Content-Security-Policy: worker-src <source>;
+Content-Security-Policy: worker-src <source> <source>;
+
+ +

Sources

+ +

{{page("fr/Web/HTTP/Headers/Content-Security-Policy/connect-src", "Sources")}}

+ +

Exemples

+ +

Cas de violation

+ +

Soit cet en-tête CSP :

+ +
Content-Security-Policy: worker-src https://example.com/
+ +

{{domxref("Worker")}}, {{domxref("SharedWorker")}} et {{domxref("ServiceWorker")}} seront bloqués et ne se chargeront pas :

+ +
<script>
+  var blockedWorker = new Worker("data:application/javascript,...");
+  blockedWorker = new SharedWorker("https://not-example.com/");
+  navigator.serviceWorker.register('https://not-example.com/sw.js');
+</script>
+ +

Spécifications

+ + + + + + + + + + + + + + + + +
SpécificationStatutCommentaire
{{specName("CSP 3.0", "#directive-worker-src", "worker-src")}}{{Spec2('CSP 3.0')}}Définition initiale.
+ +

Compatibilité des navigateurs

+ +

{{Compat("http.headers.csp.Content-Security-Policy.worker-src")}}

+ +

Voir aussi

+ + -- cgit v1.2.3-54-g00ecf