--- title: Access-Control-Allow-Methods slug: Web/HTTP/Headers/Access-Control-Allow-Methods tags: - 跨域资源共享 - 首部 translation_of: Web/HTTP/Headers/Access-Control-Allow-Methods ---
{{HTTPSidebar}}
响应首部 Access-Control-Allow-Methods
在对 {{glossary("preflight request")}}.(预检请求)的应答中明确了客户端所要访问的资源允许使用的方法或方法列表。
报头类型 | {{Glossary("Response header")}} |
---|---|
{{Glossary("Forbidden header name")}} | no |
Access-Control-Allow-Methods: <method>, <method>, ...
Access-Control-Allow-Methods: POST, GET, OPTIONS
规范 | 状态 | 注释 |
---|---|---|
{{SpecName('Fetch','#http-access-control-allow-methods', 'Access-Control-Allow-Methods')}} | {{Spec2("Fetch")}} | Initial definition |
{{Compat("http.headers.Access-Control-Allow-Methods")}}