Improve readme and fix typos

Improve wording and fix typos in readme.
This commit is contained in:
finga 2021-11-19 14:32:18 +01:00
parent 5775870a8e
commit 33e39f0b40

View file

@ -1,6 +1,6 @@
# Webhookey # Webhookey
Webhookey is a web server listening for requests as for example sent by Webhookey is a web server listening for requests as for example sent by
gitea's webhooks. Further, Webhookey allows you to specify rules Gitea's webhooks. Further, Webhookey allows you to specify rules
which are matched against the data received to trigger certain which are matched against the data received to trigger certain
actions. actions.
@ -62,7 +62,10 @@ Whereas `<config_dir>` depends on the platform:
#### Metrics #### Metrics
A metrics page can optionally enabled to query stats of the currently A metrics page can optionally enabled to query stats of the currently
running webhookey instance. Note that stats are lost between restarts running webhookey instance. Note that stats are lost between restarts
of webhookey as those are not stored persistently. of webhookey as those are not stored persistently. The `metrics`
structure is optional as well as the `ip_filter`. The `ip_filter`
supports either `allow` or `deny` containing a list of IPv4 and IPv6
addresses and networks.
Example: Example:
```yaml ```yaml
@ -127,25 +130,28 @@ Use values from header fields sent with the HTTP request.
Example: `{{ header X-Gitea-Event }}`. Example: `{{ header X-Gitea-Event }}`.
##### Allow and Deny ##### IP Filter
To allow or deny specific network ranges source is an optional Specific IPv4 and IPv6 addresses and/or ranges ranges can be allowed
configuration parameter which either contains an allow or a deny field or denied. The `ip_filter` is optional and has to contain either an
with sequences containing networks. Note that IPv6 addresses have to `allow` or a `deny` field which contains a sequence of IPv4 or IPv6
be put in single quotes due to the colons. addresses or CIDR network ranges. Note that IPv6 addresses have to be
quoted due to the colons.
Example: Example:
```yaml ```yaml
allow: ip_filter:
- 127.0.0.1 allow:
- 127.0.0.1/31 - 127.0.0.1
- "::1" - 127.0.0.1/31
- "::1"
``` ```
```yaml ```yaml
deny: ip_filter:
- 127.0.0.1 deny:
- 127.0.0.1/31 - 127.0.0.1
- "::1" - 127.0.0.1/31
- "::1"
``` ```
##### Signature ##### Signature
@ -175,7 +181,7 @@ Conjunction filters contain lists of other filters.
received http(s) request header. received http(s) request header.
- `field`: The header field which should be matched. - `field`: The header field which should be matched.
- `regeq`: Regular expression which has to match the specified - `regex`: Regular expression which has to match the specified
header field. header field.
- `json`: - `json`: