Skip to content

chore: improve documentation of PROXY protocol listener#7447

Open
lkiesow wants to merge 1 commit intocaddyserver:masterfrom
lkiesow:proxy-proto-docs
Open

chore: improve documentation of PROXY protocol listener#7447
lkiesow wants to merge 1 commit intocaddyserver:masterfrom
lkiesow:proxy-proto-docs

Conversation

@lkiesow
Copy link

@lkiesow lkiesow commented Jan 25, 2026

This patch improves the documentation of the
caddy.listeners.proxy_protocol to clarify some unexpected behavior.

Most notably, the previous documentation stated that Allow will allow/require PROXY headers. The require in this tripped me up since Caddy will always accept clients in this list regardless, if they are using PROXY protocol or not.

Assistance Disclosure

No AI was used.

This patch improves the documentation of the
caddy.listeners.proxy_protocol to clarify some unexpected behavior.

Most notably, the previous documentation stated that `Allow` will
*allow/require* PROXY headers. The require in this tripped me up since
Caddy will always accept clients in this list regardless, if they are
using PROXY protocol or not.
@lkiesow lkiesow changed the title Improve documentation of PROXY protocol listener chore: improve documentation of PROXY protocol listener Jan 25, 2026
@francislavoie francislavoie added the documentation 📚 Improvements or additions to documentation label Jan 25, 2026
Comment on lines +44 to +53
// allow PROXY headers from.
// Note that while the PROXY protocol is allowed,
// it is not required to be used by clients in this range.
Allow []string `json:"allow,omitempty"`
allow []netip.Prefix

// Deny is an optional list of CIDR ranges to
// deny PROXY headers from.
// Connections without PROXY headers from clients
// in this range are still allowed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's more fair/accurate to mention it's dependant on the fallback policy, and it should use may instead of are. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation 📚 Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants