Skip to content

fix(config): normalize trustProxy lists - #143

Open
RomainLanz wants to merge 1 commit into
9.xfrom
fix/trust-proxy-lists
Open

RomainLanz wants to merge 1 commit into
9.xfrom
fix/trust-proxy-lists

Conversation

@RomainLanz

Copy link
Copy Markdown
Member

defineConfig passed comma-separated ranges to proxy-addr as a single entry and left arrays uncompiled. Both forms can fail when requests evaluate the trust policy.

Split, trim, and compile comma-separated ranges. Compile range arrays and accept them in the config type. Empty lists trust no proxies, while invalid entries still fail at config time. Document the accepted forms and add coverage for IPv4/IPv6, named ranges, arrays, and request.ip().

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant