响应首部 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

浏览器兼容性

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome Full support 4Edge Full support 12Firefox Full support 3.5IE Full support 10Opera Full support 12Safari Full support 4WebView Android Full support 2Chrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support 4Opera Android Full support 12Safari iOS Full support 3.2Samsung Internet Android Full support Yes

Legend

Full support  
Full support

兼容性注解

查看更多

文档标签和贡献者

此页面的贡献者: Jat, crper, WayneCui
最后编辑者: Jat,