Skip to content

http:support for adding dynamic request headers to the upstream requests - #1708

Merged
mattklein123 merged 2 commits into
envoyproxy:masterfrom
khgandhi:custom-req-header-support
Sep 25, 2017
Merged

mattklein123 merged 2 commits into
envoyproxy:masterfrom
khgandhi:custom-req-header-support

Conversation

@khgandhi

@khgandhi khgandhi commented Sep 21, 2017 •

Copy link
Copy Markdown
Contributor

Fixes #1016

Signed-off-by: Kunal Gandhi [email protected]

%PROTOCOL%
The original protocol which is already added by envoy as a
:ref:`X-Forwarded-Proto <config_http_conn_man_headers_x-forwarded-proto>` request header.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Are these the only two supported Kunal ? I remember you adding support for more variables. If that's the case, it might be instructive to change the example to use a different variable, and possibly mention that these are same as ones supported by access log

return request_info.getDownstreamAddress();
};
} else {
throw EnvoyException(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That explains. I missed the history for this PR. Out of curiosity, why restrict to just two?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@rshriram a lot of the variables from the access logger would not apply here and currently, we only need this two. We can add support for more variables as we require them.

@RomanDzhabarov RomanDzhabarov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm, thanks.

Comment thread test/common/router/config_impl_test.cc Outdated
NiceMock<Upstream::MockClusterManager> cm;
NiceMock<Envoy::Http::AccessLog::MockRequestInfo> request_info;
ConfigImpl config(parseRouteConfigurationFromJson(json), runtime, cm, true);
const std::string downstream_addr = ("127.0.0.1");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: "127.0.0.1".

@RomanDzhabarov

Copy link
Copy Markdown
Member

@mattklein123 @htuch do you want to take a pass on this?

@mattklein123

Copy link
Copy Markdown
Member

Yup will do early next week.

@mattklein123 mattklein123 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@khgandhi looks great. Thanks for seeing this through. I think just fix @RomanDzhabarov and we are good to go. Thank you!

@khgandhi
khgandhi force-pushed the custom-req-header-support branch from f9204d3 to 6a91224 Compare September 25, 2017 03:59
@khgandhi
khgandhi force-pushed the custom-req-header-support branch from 6a91224 to 264bf54 Compare September 25, 2017 04:04
@khgandhi

Copy link
Copy Markdown
Contributor Author

Thank you @mattklein123 . after making the change, the circleci build is failing due the following error:

brew ls --versions coreutils >/dev/null || brew install coreutils
bash: line 1: brew: command not found
bash: line 1: brew: command not found

brew ls --versions coreutils >/dev/null || brew install coreutils returned exit code 127

Also, the Mac OSX build seems to have passed but it does not seem to get marked as a successful step on the PR

https://circleci.com/gh/turbinelabs/envoy/796

@mattklein123
mattklein123 merged commit 9e933d3 into envoyproxy:master Sep 25, 2017
mathetake added a commit that referenced this pull request Mar 3, 2026
…1711)

**Description**

This uses more accurate prefixes for EG's special listener detections.
Previously, the Gateway objects created in "envoy-gateway-*" namespaces
were skipped because we used very large "envoy-gateway-" prefix.

**Related Issues/PRs (if applicable)**

Fixes #1708

Signed-off-by: Takeshi Yoneda <[email protected]>
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.

4 participants