Skip to content
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

access log: make %DOWNSTREAM_DIRECT_REMOTE_ADDRESS% work correctly with PROXY protocol #10419

Merged
merged 4 commits into from
Mar 18, 2020

Conversation

ggreenway
Copy link
Contributor

Previously, this access log field would return the value read from the
PROXY protocol header instead of using the direct address, as
documented.

Risk Level: Low
Testing: Added integration test
Docs Changes: none
Release Notes: added
Fixes #10328

…th PROXY protocol

Previously, this access log field would return the value read from the
PROXY protocol header instead of using the direct address, as
documented.

Fixes: envoyproxy#10328
Signed-off-by: Greg Greenway <ggreenway@apple.com>
Signed-off-by: Greg Greenway <ggreenway@apple.com>
Signed-off-by: Greg Greenway <ggreenway@apple.com>
zuercher
zuercher previously approved these changes Mar 18, 2020
Copy link
Member

@zuercher zuercher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small typo, but otherwise looks good!

@@ -92,6 +92,32 @@ TEST_P(ProxyProtoIntegrationTest, RouterProxyUnknownLongRequestAndResponseWithBo
testRouterRequestAndResponseWithBody(1024, 512, false, &creator);
}

// Test that %DOWNSTREAM_DIRECT_REMOTE_ADDRESS*% returns the direct address, and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: extra asterisk here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added that to note that it also applies to DOWNSTREAM_DIRECT_REMOTE_ADDRESS_WITHOUT_PORT, but maybe I should just enumerate the two.

Signed-off-by: Greg Greenway <ggreenway@apple.com>
Copy link
Member

@zuercher zuercher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the run-around!

@ggreenway ggreenway merged commit 9d500b0 into envoyproxy:master Mar 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Access log specifier %DOWNSTREAM_DIRECT_REMOTE_ADDRESS% does not work as documented with proxy-protocol
2 participants