ecs

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: BSD-3-Clause Imports: 6 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/address net.IP 198.51.100.1 The address.

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 (h *Ecs) Err(err error) error

func (*Ecs) HandlerFunc

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

func (*Ecs) Key

func (h *Ecs) Key() string

Jump to

Keyboard shortcuts

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