Access-Control-Request-Headers
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
Access-Control-Request-Headers
请求标头用于浏览器在发起预检请求时告知服务器客户端在实际请求发送时(例如使用 fetch()
或 XMLHttpRequest.setRequestHeader()
)可能附带的 HTTP 标头。服务器端对应的响应标头为 Access-Control-Allow-Headers
,表示对浏览器的请求标头的回应。
语法
http
Access-Control-Request-Headers: <header-name>,<header-name>,…
指令
- <header-name>
-
在请求中包含唯一的、以逗号分隔的小写 HTTP 标头的排序列表。
示例
http
Access-Control-Request-Headers: content-type,x-pingother
规范
Specification |
---|
Fetch Standard # http-access-control-request-headers |
浏览器兼容性
BCD tables only load in the browser