-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Add DOWNSTREAM_LOCAL_ADDRESS header variable #2487
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small comment. Thanks! Please do doc PR that we can review at the same time.
@@ -126,6 +126,12 @@ RequestInfoHeaderFormatter::RequestInfoHeaderFormatter(absl::string_view field_n | |||
return RequestInfo::Utility::formatDownstreamAddressNoPort( | |||
*request_info.downstreamRemoteAddress()); | |||
}; | |||
} else if (field_name == "ORIGINAL_DST" || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need "ORIGINAL_DST"? Would prefer to only have one and the other is more common with the new layout.
I think ORiGin_dst is more in-line with the cluster type of the same meaning. It also better describes the content. |
I'm sorry I disagree. We already have precedent for this in the access log formatter and I would like to be consistent: https://github.com/envoyproxy/envoy/blob/master/source/common/access_log/access_log_formatter.cc#L234 You are forwarding the local address, which is useful either in the case of original_dst or not. Feel free to provide ample links in the docs to the original_dst filter, describe the scenario, etc. Also, if you add a "WITHOUT_PORT" option please also add it to the access log formatter (with tests) so we have parity. |
Ok, I will remove original_dst alias. |
a51e65b
to
b07b504
Compare
Can you merge master to pickup #2490? |
b07b504
to
1fda658
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM! Can you add a note to RAW_RELEASE_NOTES.md please?
Adds ORIGINAL_DST header variable which is an alias for DOWNSTREAM_LOCAL_ADDRESS_WITHOUT_PORT. ORIGINAL_DST is the address that the client initially expected to reach. Signed-off-by: Mandar U Jog <[email protected]>
Add DOWNSTREAM_LOCAL_ADDRESS_WITHOUT_PORT to header_formatter and access_log_formatter. Signed-off-by: Mandar U Jog <[email protected]>
Signed-off-by: Mandar U Jog <[email protected]>
Signed-off-by: Mandar U Jog <[email protected]>
1fda658
to
f9a54aa
Compare
@mattklein123 Updated RAW_RELEASE_NOTES. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Adds ORIGINAL_DST header variable which is an alias for
DOWNSTREAM_LOCAL_ADDRESS_WITHOUT_PORT.
ORIGINAL_DST is the address that the client initially expected to reach.
Signed-off-by: Mandar U Jog [email protected]
fixes #2484