Revision 1133983 of Access-Control-Request-Headers

  • Revision slug: Web/HTTP/Headers/Access-Control-Request-Headers
  • Revision title: Access-Control-Request-Headers
  • Revision id: 1133983
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

{{HTTPSidebar}}

The Access-Control-Request-Headers request header is used when issuing a {{glossary("preflight request")}} to let the server know which HTTP headers will be used when the actual request is made.

Header type {{Glossary("Request header")}}
{{Glossary("Forbidden header name")}} yes

Syntax

Access-Control-Request-Headers: <header-name>, <header-name>, ...

Directives

<header-name>
A comma-delimited list of HTTP headers that are included in the request.

Examples

Access-Control-Request-Headers: X-PINGOTHER, Content-Type

Specifications

Specification Status Comment
{{SpecName('Fetch','#http-access-control-request-headers', 'Access-Control-Request-Headers')}} {{Spec2("Fetch")}} Initial definition.

Browser compatibility

{{Compat}}

See also

  • {{HTTPHeader("Access-Control-Request-Method")}}

Revision Source

<div>{{HTTPSidebar}}</div>

<p>The <strong><code>Access-Control-Request-Headers</code></strong> request header is used when issuing a {{glossary("preflight request")}} to let the server know which <a href="/en-US/docs/Web/HTTP/Headers">HTTP headers</a> will be used when the actual request is made.</p>

<table class="properties">
 <tbody>
  <tr>
   <th scope="row">Header type</th>
   <td>{{Glossary("Request header")}}</td>
  </tr>
  <tr>
   <th scope="row">{{Glossary("Forbidden header name")}}</th>
   <td>yes</td>
  </tr>
 </tbody>
</table>

<h2 id="Syntax">Syntax</h2>

<pre class="syntaxbox">
Access-Control-Request-Headers: &lt;header-name&gt;, &lt;header-name&gt;, ...
</pre>

<h2 id="Directives">Directives</h2>

<dl>
 <dt>&lt;header-name&gt;</dt>
 <dd>A comma-delimited list of <a href="/en-US/docs/Web/HTTP/Headers">HTTP headers</a> that are included in the request.</dd>
</dl>

<h2 id="Examples">Examples</h2>

<pre>
Access-Control-Request-Headers: X-PINGOTHER, Content-Type</pre>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</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="Browser_compatibility">Browser compatibility</h2>

<p class="hidden">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}}</p>

<h2 id="See_also">See also</h2>

<ul>
 <li>{{HTTPHeader("Access-Control-Request-Method")}}</li>
</ul>
Revert to this revision