Access-Control-Allow-Methods
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.
语法
http
Access-Control-Allow-Methods: <method>, <method>, …
Access-Control-Allow-Methods: *
指令
- <method>
-
一个以逗号分隔,表示允许使用的 HTTP 请求方法的列表。
*
(通配符)-
“
*
”值仅在无凭据的请求(即不包含 HTTP cookie 或 HTTP 认证信息的请求)中视为特殊的通配符值。在带有凭据的请求中,它被当作字面意义的标头名称“*
”处理,不具有特殊语义。
示例
http
Access-Control-Allow-Methods: GET, POST
Access-Control-Allow-Methods: *
规范
Specification |
---|
Fetch # http-access-control-allow-methods |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Access-Control-Allow-Methods | ||||||||||||
Wildcard ( * ) |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.