blob: 43050d3c98d68c735de71b41ef57949dfa3702e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
---
title: Access-Control-Request-Headers
slug: Web/HTTP/Headers/Access-Control-Request-Headers
tags:
- 跨域资源共享
translation_of: Web/HTTP/Headers/Access-Control-Request-Headers
---
<div>{{HTTPSidebar}}</div>
<p>请求头 <strong><code>Access-Control-Request-Headers </code></strong>出现于 {{glossary("preflight request")}} (预检请求)中,用于通知服务器在真正的请求中会采用哪些请求头。</p>
<table class="properties">
<tbody>
<tr>
<th scope="row">报头类型</th>
<td>{{Glossary("Request header")}}</td>
</tr>
<tr>
<th scope="row">{{Glossary("Forbidden header name")}}</th>
<td>yes</td>
</tr>
</tbody>
</table>
<h2 id="语法">语法</h2>
<pre class="syntaxbox">Access-Control-Request-Headers: <header-name>, <header-name>, ...
</pre>
<h2 id="指令">指令</h2>
<dl>
<dt><header-name></dt>
<dd>在实际请求中将要包含的一系列 <a href="/en-US/docs/Web/HTTP/Headers">HTTP </a>头,以逗号分隔。</dd>
</dl>
<h2 id="示例">示例</h2>
<pre>Access-Control-Request-Headers: X-PINGOTHER, Content-Type</pre>
<h2 id="规范">规范</h2>
<table class="standard-table">
<tbody>
<tr>
<th scope="col">规范</th>
<th scope="col">状态</th>
<th scope="col">注释</th>
</tr>
<tr>
<td>{{SpecName('Fetch','#http-access-control-request-headers', 'Access-Control-Request-Headers')}}</td>
<td>{{Spec2("Fetch")}}</td>
<td>Initial definition.</td>
</tr>
</tbody>
</table>
<h2 id="浏览器兼容性">浏览器兼容性</h2>
<p>{{Compat("http.headers.Access-Control-Request-Headers")}}</p>
<h2 id="相关内容">相关内容</h2>
<ul>
<li>{{HTTPHeader("Access-Control-Request-Method")}}</li>
</ul>
|