Skip to content

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

Merged
ggreenway merged 4 commits intoenvoyproxy:masterfrom
ggreenway:proxy-proto-direct-address
Mar 18, 2020
Merged

access log: make %DOWNSTREAM_DIRECT_REMOTE_ADDRESS% work correctly with PROXY protocol#10419
ggreenway merged 4 commits intoenvoyproxy:masterfrom
ggreenway:proxy-proto-direct-address

Conversation

@ggreenway
Copy link
Member

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!

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
Member 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