响应首部 Access-Control-Allow-Methods
在对 preflight request.(预检请求)的应答中明确了客户端所要访问的资源允许使用的方法或方法列表。
报头类型 | Response header |
---|---|
Forbidden header name | no |
语法
Access-Control-Allow-Methods: <method>, <method>, ...
指令
- <method>
- 用逗号隔开的允许使用的 HTTP request methods 列表。
例子
Access-Control-Allow-Methods: POST, GET, OPTIONS
规范
规范 | 状态 | 注释 |
---|---|---|
Fetch Access-Control-Allow-Methods |
Living Standard | Initial definition |
浏览器兼容性
BCD tables only load in the browser
The compatibility table in 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.
兼容性注解
- 最新规范中提到的通配符值(*)尚未在以下浏览器中实现:
- Chromium: Issue 615313
- Firefox: bug 1309358
- Servo: Issue 13283