ingress-nginx icon indicating copy to clipboard operation
ingress-nginx copied to clipboard

Add standard Forwarded header support

Open zitudu opened this issue 2 years ago • 8 comments

What this PR does / why we need it:

Add support of standard Forwarded defined by RFC 7239. Implement #10263

ConfigMap options:

	// Enable standard forwarded header.
	// Default: false
	EnableForwardedRFC7239 bool `json:"enable-forwarded-rfc7239"`

	// Sets if strips incoming Forwarded header.
	// Default: false
	ForwardedRFC7239StripIncomming bool `json:"forwarded-rfc7239-strip-incomming"`

	// Sets Forwarded parameters and their order. Available options are "for", "by", "host", "proto".
	// Default: "for"
	ForwardedRFC7239 []string `json:"forwarded-rfc7239"`

	// Sets Forwarded "for" parameter node identifier, should be "ip" or a static obfuscated string.
	// Default: "ip"
	ForwardedRFC7239For string `json:"forwarded-rfc7239-for,omitempty"`

	// Sets Forwarded "by" parameter node identifier, should be "ip" or a static obfuscated string.
	// Default: "ip"
	ForwardedRFC7239By string `json:"forwarded-rfc7239-by,omitempty"`

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] CVE Report (Scanner found CVE and adding report)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] Documentation only

Which issue/s this PR fixes

How Has This Been Tested?

Checklist:

  • [x] My change requires a change to the documentation.
  • [x] I have updated the documentation accordingly.
  • [x] I've read the CONTRIBUTION guide
  • [x] I have added unit and/or e2e tests to cover my changes.
  • [x] All new and existing tests passed.

zitudu avatar Aug 16 '23 06:08 zitudu