Access-Control-Allow-Methods

响应首部 Access-Control-Allow-Methods 在对 preflight request.(预检请求)的应答中明确了客户端所要访问的资源允许使用的方法或方法列表。

Header type Response header
Forbidden header name no

语法

Access-Control-Allow-Methods: <method>, <method>, ...

指令

<method>
用逗号隔开的允许使用的 HTTP request methods 列表。

Examples

Access-Control-Allow-Methods: POST, GET, OPTIONS

Specifications

Specification Status Comment
Fetch
Access-Control-Allow-Methods
Living Standard Initial definition

Browser compatibility

FeatureChromeFirefoxEdgeInternet ExplorerOperaSafari
Basic Support43.51210124
FeatureAndroidChrome for AndroidEdge mobileFirefox for AndroidIE mobileOpera AndroidiOS Safari
Basic Support2.1(Yes)(Yes)1.0(Yes)123.2

Compatibility notes

See also

文档标签和贡献者