aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/http/headers/content-security-policy/report-to
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/zh-cn/web/http/headers/content-security-policy/report-to
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/http/headers/content-security-policy/report-to')
-rw-r--r--files/zh-cn/web/http/headers/content-security-policy/report-to/index.html82
1 files changed, 82 insertions, 0 deletions
diff --git a/files/zh-cn/web/http/headers/content-security-policy/report-to/index.html b/files/zh-cn/web/http/headers/content-security-policy/report-to/index.html
new file mode 100644
index 0000000000..9789e2363d
--- /dev/null
+++ b/files/zh-cn/web/http/headers/content-security-policy/report-to/index.html
@@ -0,0 +1,82 @@
+---
+title: report-to
+slug: Web/HTTP/Headers/Content-Security-Policy/report-to
+translation_of: Web/HTTP/Headers/Content-Security-Policy/report-to
+---
+<p><dfn><code>Report-To</code></dfn> HTTP响应头部指示客户端存储特定域名的报告端点。</p>
+
+<pre>Content-Security-Policy: ...; report-to groupname
+</pre>
+
+<p>该指令本身没有任何影响,仅与其他指令结合起来才有意义。</p>
+
+<table>
+ <tbody>
+ <tr>
+ <th scope="row">CSP version</th>
+ <td>1</td>
+ </tr>
+ <tr>
+ <th scope="row">指令类型</th>
+ <td>{{Glossary("Reporting directive")}}</td>
+ </tr>
+ <tr>
+ <th colspan="2" scope="row">
+ <p>{{HTMLElement("meta")}} <span style="font-style: inherit; font-weight: inherit;">元素并不支持该指令</span></p>
+ </th>
+ </tr>
+ </tbody>
+</table>
+
+<p> </p>
+
+<h2 id="Syntax">Syntax</h2>
+
+<p> </p>
+
+<pre>Content-Security-Policy: report-to &lt;json-field-value&gt;;</pre>
+
+<h2 id="Examples">Examples</h2>
+
+<p>可以查看{{HTTPHeader("Content-Security-Policy-Report-Only")}}获取更多信息和示例。</p>
+
+<pre><a href="http://wicg.github.io/reporting/#report-to" id="ref-for-report-to①">Report-To</a>: { "<a href="http://wicg.github.io/reporting/#group" id="ref-for-group①">group</a>": "csp-endpoint",
+ "<a href="http://wicg.github.io/reporting/#max-age" id="ref-for-max-age①">max-age</a>": 10886400,
+ "<a href="http://wicg.github.io/reporting/#endpoints" id="ref-for-endpoints②">endpoints</a>": [
+ { "<a href="http://wicg.github.io/reporting/#url" id="ref-for-url②">url</a>": "https://example.com/csp-reports" }
+ ] },
+ { "<a href="http://wicg.github.io/reporting/#group" id="ref-for-group②">group</a>": "hpkp-endpoint",
+ "<a href="http://wicg.github.io/reporting/#max-age" id="ref-for-max-age②">max-age</a>": 10886400,
+ "<a href="http://wicg.github.io/reporting/#endpoints" id="ref-for-endpoints③">endpoints</a>": [
+ { "<a href="http://wicg.github.io/reporting/#url" id="ref-for-url③">url</a>": "https://example.com/hpkp-reports" }
+ ] }
+<a href="https://w3c.github.io/webappsec-csp/#content-security-policy" id="ref-for-content-security-policy①">Content-Security-Policy</a>: ...; <a href="https://w3c.github.io/webappsec-csp/#directives-reporting" id="ref-for-directives-reporting①">report-to</a> csp-endpoint
+</pre>
+
+<p> </p>
+
+<pre><a href="http://wicg.github.io/reporting/#report-to" id="ref-for-report-to">Report-To</a>: { "<a href="http://wicg.github.io/reporting/#group" id="ref-for-group">group</a>": "endpoint-1",
+ "<a href="http://wicg.github.io/reporting/#max-age" id="ref-for-max-age">max-age</a>": 10886400,
+ "<a href="http://wicg.github.io/reporting/#endpoints" id="ref-for-endpoints①">endpoints</a>": [
+ { "<a href="http://wicg.github.io/reporting/#url" id="ref-for-url">url</a>": "https://example.com/reports" },
+ { "<a href="http://wicg.github.io/reporting/#url" id="ref-for-url①">url</a>": "https://backup.com/reports" }
+ ] }
+
+<a href="https://w3c.github.io/webappsec-csp/#content-security-policy" id="ref-for-content-security-policy">Content-Security-Policy</a>: ...; <a href="https://w3c.github.io/webappsec-csp/#directives-reporting" id="ref-for-directives-reporting">report-to</a> endpoint-1</pre>
+
+<p> </p>
+
+<p>Browser compatibility</p>
+
+<p>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.report-to")}}</p>
+
+<h2 id="See_also">See also</h2>
+
+<ul>
+ <li>{{HTTPHeader("Content-Security-Policy")}}</li>
+ <li>{{HTTPHeader("Content-Security-Policy-Report-Only")}}</li>
+</ul>
+
+<p> </p>