ecs

package
v0.6.41 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2026 License: BSD-3-Clause Imports: 5 Imported by: 0

README

Name

ecs - add client subnet address

Description

This handler adds the EDNS0 client subnet's (RFC 7871) subnet to the current context. If none is found, nothing is added. Other handlers, like geoip or acl can use this data instead of the source IP address.

Syntax

ecs

Examples

Enable cookies:

example.org {
    ecs
    whoami
}

Context

The ecs handler adds a single key to the context:

Key Type Example Description
ecs/addr netip.Addr 198.51.100.1 The address.

When the log handler is used the address is automatically logged as ecs.addr=...

See Also

See RFC 7871.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Err

func Err(err error) slog.Attr

Types

type Ecs

type Ecs struct{}

func (*Ecs) Err

func (e *Ecs) Err(err error) error

func (*Ecs) HandlerFunc

func (e *Ecs) HandlerFunc(next dns.HandlerFunc) dns.HandlerFunc

func (*Ecs) Key

func (e *Ecs) Key() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL