aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/glossary/simple_response_header
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/glossary/simple_response_header
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/glossary/simple_response_header')
-rw-r--r--files/zh-cn/glossary/simple_response_header/index.html39
1 files changed, 39 insertions, 0 deletions
diff --git a/files/zh-cn/glossary/simple_response_header/index.html b/files/zh-cn/glossary/simple_response_header/index.html
new file mode 100644
index 0000000000..b916ab3c45
--- /dev/null
+++ b/files/zh-cn/glossary/simple_response_header/index.html
@@ -0,0 +1,39 @@
+---
+title: Simple response header
+slug: Glossary/Simple_response_header
+tags:
+ - Simple response header
+translation_of: Glossary/Simple_response_header
+---
+<p>一个简单的响应头(或CORS安全列表的响应头)是一个 <a href="/en-US/docs/Web/HTTP/Headers">HTTP 头 </a>,它是以下之一:</p>
+
+<ul>
+ <li>{{HTTPHeader("Cache-Control")}}</li>
+ <li>{{HTTPHeader("Content-Language")}}</li>
+ <li>{{HTTPHeader("Content-Type")}}</li>
+ <li>{{HTTPHeader("Expires")}}</li>
+ <li>{{HTTPHeader("Last-Modified")}}</li>
+ <li>{{HTTPHeader("Pragma")}}</li>
+</ul>
+
+<p>These headers will not be filtered when the response is filtered by CORS, they are considered as <em>safe</em> (as the headers listed in {{HTTPHeader("Access-Control-Expose-Headers")}}.</p>
+
+<h2 id="Examples">Examples</h2>
+
+<h3 id="Extending_the_safelist">Extending the safelist</h3>
+
+<p>You can extend the list of CORS-safelisted response headers by using the {{HTTPHeader("Access-Control-Expose-Headers")}} header:</p>
+
+<pre>Access-Control-Expose-Headers: X-Custom-Header, Content-Length</pre>
+
+<h2 id="Learn_more">Learn more</h2>
+
+<ul>
+ <li><a href="/en-US/docs/Web/HTTP">HTTP</a></li>
+ <li><a href="/en-US/docs/Web/HTTP/Headers">HTTP headers</a></li>
+ <li>{{HTTPHeader("Access-Control-Expose-Headers")}}</li>
+ <li>{{Glossary("CORS")}}</li>
+ <li>{{Glossary("Simple header")}}</li>
+ <li>{{Glossary("Forbidden header name")}}</li>
+ <li>{{Glossary("Request header")}}</li>
+</ul>