HTTP Headers
Allow
The HTTP Allow
response header
lists the set of request methods supported by a resource.
This header must be sent if the server responds with a 405 Method Not Allowed
status code to indicate which request methods can be used instead.
An empty Allow
value indicates that the resource allows no request methods, which might occur temporarily for a given resource.
Syntax
Allow: <http-methods>
Directives
- <http-methods>
- A comma-separated list of allowed request methods supported by a resource.
Example
Allow: GET, POST, HEAD
How to Modify Header using Requestly
Requestly is a powerful Chrome extension that allows you to modify HTTP headers, including the Allow header. This can help you test and debug server behaviors related to allowed HTTP methods during development. Steps to Modify the Allow Header:
- Install and open the Requestly Chrome extension. You can find it on the Chrome Web Store.
- Create a new rule: Click on “Create Rule” and choose “Modify Headers” from the list of available rule types.
- Add a new header modification:
- Under “Action”, select “Add” or “Override”.
- In the “Header Name” field, enter Allow.
- In the “Header Value” field, enter the HTTP methods you want to specify (e.g., GET, POST, OPTIONS).
- Set the URL condition: Specify the URL or pattern where this header change should apply (e.g., https://your-api.com/*).
- Save the rule.
Modifying the Allow header lets you simulate different allowed HTTP methods on your server’s responses, helping you verify how clients will react to different method restrictions or permissions.
Table of Contents
- No headings found.