feat: support host rewriting for dynamic resolver
This PR allows rewriting the host for requests to a dynamic resolver backend using either a header value or a literal. EG will use the specified host for both DNS resolving to get the endpoints and the host header in the forwarded requests.
Implement #7638 Release Note: Yes
Codecov Report
:x: Patch coverage is 84.96503% with 43 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 72.51%. Comparing base (c1c227b) to head (c8a733a).
:warning: Report is 13 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #7719 +/- ##
==========================================
+ Coverage 72.38% 72.51% +0.13%
==========================================
Files 234 235 +1
Lines 34562 34821 +259
==========================================
+ Hits 25016 25252 +236
- Misses 7756 7765 +9
- Partials 1790 1804 +14
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
overall LGTM. looks like we both worked on the same thing =]. Closing my dupe pr: https://github.com/envoyproxy/gateway/pull/7723.
I think that we should avoid using the default host rewrites in this case, e.g. as explained here: https://github.com/envoyproxy/gateway/pull/7723/files#diff-698fcb61202958faff1d63f1eed4a0a3111a888e3b7370f8f16a32cd96b78349R515
Also, we can try to support "literal" host rewrite, since we already have an API for that through GW-API URLRewrite filter: https://github.com/envoyproxy/gateway/pull/7723/files#diff-4e36661dbe02253cfca3d8a82ca2fad306f6e0743ea87d192a51c781aedcaaadR161
maybe also document behavior change in release notes: https://github.com/envoyproxy/gateway/pull/7723/files#diff-8261eaec1f1079fe46bee37a988c04a7876b25a7c93fdc67db2f918ee5e406fbR7