Restructure and minor improvements

In order to keep things together the code was restructured. Some small
improvements such as clippy warnings and the validation of a hook in
regards of the ip filter.
This commit is contained in:
finga 2021-06-02 03:35:43 +02:00 committed by finga
parent d29bfdf88d
commit 65430e65b7
4 changed files with 169 additions and 169 deletions

View file

@ -67,12 +67,12 @@ Whereas `<config_dir>` depends on the platform:
#### Hooks
With `hooks` you can configure a sequence of hooks. A single hook
consists of the following fields:
- command: A command to be executed if a filter matches
- allow/deny: An optional parameter to either allow or deny specific
source addresses or ranges.
- signature: Name of the HTTP header field containing the signature.
- secrets: List of secrets.
- filter: Tree of filters.
- `command`: A command to be executed if a filter matches
- `allow`/`deny`: An optional parameter to either allow or deny
specific source addresses or ranges.
- `signature`: Name of the HTTP header field containing the signature.
- `secrets`: List of secrets.
- `filter`: Tree of filters.
Example:
```yaml
@ -163,7 +163,7 @@ Conjunction filters contain lists of other filters.
The `json` filter matches a regular expression on a field from the
received JSON data.
- pointer: Pointer to the JSON field according to [RFC
- `pointer`: Pointer to the JSON field according to [RFC
6901](https://tools.ietf.org/html/rfc6901).
- regex: Regular expression which has to match the field pointed to
by the pointer.
- `regex`: Regular expression which has to match the field pointed
to by the pointer.