From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../content-security-policy/report-to/index.html | 83 ++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 files/fr/web/http/headers/content-security-policy/report-to/index.html (limited to 'files/fr/web/http/headers/content-security-policy/report-to') diff --git a/files/fr/web/http/headers/content-security-policy/report-to/index.html b/files/fr/web/http/headers/content-security-policy/report-to/index.html new file mode 100644 index 0000000000..ad134606c0 --- /dev/null +++ b/files/fr/web/http/headers/content-security-policy/report-to/index.html @@ -0,0 +1,83 @@ +--- +title: 'CSP: report-to' +slug: Web/HTTP/Headers/Content-Security-Policy/report-to +tags: + - CSP + - Content-Security-Policy + - Directive + - HTTP + - Reporting + - Security + - Sécurité + - report-to +translation_of: Web/HTTP/Headers/Content-Security-Policy/report-to +--- +
{{HTTPSidebar}}
+ +

La directive HTTP {{HTTPHeader("Content-Security-Policy")}} (CSP) report-to demande à l'agent utilisateur de rapporter les violations de règles CSP à l'adresse fournie dans un groupe de l'en-tête HTTP Report-To.

+ +
Content-Security-Policy: ...; report-to groupname
+
+ +

Cette directive n'a aucun effet en elle-même, mais prend tout son sens en étant combinée à d'autres directives.

+ + + + + + + + + + + + + + + +
Version de CSP1
Type de directive{{Glossary("Reporting directive")}}
This directive is not supported in the {{HTMLElement("meta")}} element.
+ +

Syntaxe

+ +
Content-Security-Policy: report-to <json-field-value>;
+ +

Exemples

+ +

Voir {{HTTPHeader("Content-Security-Policy-Report-Only")}} pour plus d'informations et d'exemples.

+ +
Report-To: { "group": "csp-endpoint",
+             "max_age": 10886400,
+             "endpoints": [
+               { "url": "https://example.com/csp-reports" }
+             ] },
+           { "group": "hpkp-endpoint",
+             "max_age": 10886400,
+             "endpoints": [
+               { "url": "https://example.com/hpkp-reports" }
+             ] }
+Content-Security-Policy: ...; report-to csp-endpoint
+
+ +
Report-To: { "group": "endpoint-1",
+             "max_age": 10886400,
+             "endpoints": [
+               { "url": "https://example.com/reports" },
+               { "url": "https://backup.com/reports" }
+             ] }
+
+Content-Security-Policy: ...; report-to endpoint-1
+ +

Compatibilité des navigateurs

+ + + +

{{Compat("http.headers.csp.Content-Security-Policy.report-to")}}

+ +

Voir aussi

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