-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HCM route request_headers_to_add cannot evaluate upstream host info correctly #12236
Comments
I moved finalizeRequestHeaders to this place. all test cases except 2 cases expect the function be invoked there failed, which is not hard to update test cases. Please let me know if you have any concerns on move the |
I think I'd want to see the PR to understand better the effect of the change. |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions. |
UPSTREAM_METADATA is referring to the
metadata
inHostDescription
, which is reasonable IFFan upstream host is selected.
However, the evaluation is invoked before the upstream is selected so we can never encode the upstream
info into the header to upstream.
Approach:
Instead run header evaluation during route decoding the downstream header, push back to onPoolReady()
beside the
parent_.downstreamHeaders()->setHost(host->hostname());
I evaluate twice which is not ideal but it solve my problem.
Example config:
The text was updated successfully, but these errors were encountered: