dfp: add support for DFP honoring dynamic_host filter state when configured #39605
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The HTTP Dynamic Forward Proxy filter doesn't honor the
envoy.upstream.dynamic_host
filter state value that's set in the stream info, while both the SNI Dynamic Forward Proxy and UDP Dynamic Forward Proxy filters properly check for and use this value.This inconsistency means host overriding via filter state works for SNI/UDP proxies but not for HTTP proxies. IMO the behavior is a bit confusing when trying to use the same filter state mechanism across different proxy types.
Changes
This PR adds a new flag called
allow_dynamic_host_from_filter_state
which when enabled allows HTTP DFP filter to use the filter state values for host and port lookups.Fixes: #39579
Commit Message: dfp: add support for DFP honoring dynamic_host filter state when configured
Additional Description: Add support for DFP to honor
dynamic_host
anddynamic_port
filter state values when configured.Risk Level: Low
Testing: Added Unit & Integration Tests
Docs Changes: Added
Release Notes: Added