Method Filter
This module provides support for method filtering.
Example configuration
The following configuration will allow the HTTP/1.1 compliant request methods for the consumer admin, while read only access is allowed for other clients.
{
"name": "example",
"host": "example.com",
"path": "/*",
"modules": [
{
"order": 0,
"name": "filter-method",
"consumers": {
"admin": {
"allow": "OPTIONS GET HEAD POST PUT DELETE TRACE CONNECT"
}
},
"default": {
"allow": "GET HEAD"
}
}
]
}
Configuration attributes
| Attribute |
Required |
Type |
Description |
allow |
Yes |
String |
The methods allowed separated by whitespace. |
Response status
| Status |
Description |
200 |
Request method allowed. |
405 |
Request method not allowed. |
| Header |
Description |
Allow |
The methods that are allowed. |