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.

Response headers

Header Description
Allow The methods that are allowed.

®Varnish Software, Wallingatan 12, 111 60 Stockholm, Organization nr. 556805-6203