Allow 标头列出了资源支持的方法集。
当服务器响应带有 405 Method Not Allowed 状态码时必须发送此标头,以表示可以使用哪些请求方法。Allow 空标头表示该资源不允许使用任何请求方法,例如,这种情况可能针对某个特定资源会临时出现。
<table class="properties"> <tbody> <tr> <th scope="row">标头类型</th> <td>Response header</td> </tr> <tr> <th scope="row">Forbidden header name</th> <td>否</td> </tr> </tbody> </table>
语法
Allow: <http-methods>
指令
- <http-methods>
- : 以逗号分隔的允许 HTTP 请求方法列表。
示例
Allow: GET, POST, HEAD
规范
参见
- 405
- Server
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
