| 1 |
# Name |
| 2 |
|
| 3 |
_ecs_ - add client subnet address |
| 4 |
|
| 5 |
# Description |
| 6 |
|
| 7 |
This handler adds the EDNS0 client subnet's (RFC 7871) subnet to the current context. If none is found, nothing |
| 8 |
is added. Other handlers, like _geoip_ or _acl_ can use this data instead of the source IP address. |
| 9 |
|
| 10 |
# Syntax |
| 11 |
|
| 12 |
```txt |
| 13 |
ecs |
| 14 |
``` |
| 15 |
|
| 16 |
# Examples |
| 17 |
|
| 18 |
Enable cookies: |
| 19 |
|
| 20 |
```conffile |
| 21 |
example.org { |
| 22 |
ecs |
| 23 |
whoami |
| 24 |
} |
| 25 |
``` |
| 26 |
|
| 27 |
# Context |
| 28 |
|
| 29 |
The _ecs_ handler adds a single key to the context: |
| 30 |
|
| 31 |
| Key | Type | Example | Description | |
| 32 |
| :--------- | :----------- | :----------- | :----------- | |
| 33 |
| `ecs/addr` | `netip.Addr` | 198.51.100.1 | The address. | |
| 34 |
|
| 35 |
When the _log_ handler is used the address is automatically logged as `ecs.addr=..`. |
| 36 |
|
| 37 |
# See Also |
| 38 |
|
| 39 |
See RFC 7871, atomdns-log(7), atomdns-geoip(7) and atomdns-acl(7). |