Skip to content

feat: add configurable custom header forwarding in proxy#2

Closed
oscartrullols wants to merge 1 commit intoallow-ip-rangesfrom
feat/configurable-forwarded-headers
Closed

feat: add configurable custom header forwarding in proxy#2
oscartrullols wants to merge 1 commit intoallow-ip-rangesfrom
feat/configurable-forwarded-headers

Conversation

@oscartrullols
Copy link
Copy Markdown
Member

Adds a new serve.proxy.trust_custom_headers config key (list of strings) to forward arbitrary custom HTTP headers from the incoming request to the upstream.

This complements the existing trust_forwarded_headers boolean (which handles standard X-Forwarded-* headers) and is suitable for upstream contribution.

serve:
  proxy:
    trust_forwarded_headers: true
    trust_custom_headers:
      - X-Source-Port

Image: registry.nearbycomputing.com/nearbyone/external/oryd/oathkeeper:v25.4.1-ips-custom-headers-alpine

Introduce serve.proxy.trust_custom_headers configuration key that
accepts a list of custom HTTP header names to forward from the
incoming request to the upstream. This complements the existing
serve.proxy.trust_forwarded_headers boolean (which controls the
standard X-Forwarded-* headers) by allowing arbitrary headers
(e.g. X-Source-Port) set by trusted infrastructure to be preserved.
@oscartrullols
Copy link
Copy Markdown
Member Author

this fix is not needed... the X-Source-port is not stripped so there's no need to restore it, our root-problem is in a previous layer

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