You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there is no way to use request headers in response_headers_to_add (it doesn't support %REQ(header-name)%).
However it would be nice to have an access to certain headers, namely x-request-id.
Normally a backend would echo the x-request-id header, so that it would be proxied to a client.
When there is a request timeout, envoy sends the "504 upstream request timeout" reply, and the client doesn't get the x-request-id.
Although it might be useful to echo other envoy-generated request headers (e.g. uber-trace-id for traces), for now it would be sufficient to add the %REQUEST_ID% in StreamInfoHeaderFormatter, requestId in StreamInfo, and set it in the http connection manager together with setDownstreamRemoteAddress, after the ConnectionManagerUtility::mutateRequestHeaders call.
The text was updated successfully, but these errors were encountered:
And there is another thing, on request timeout, the Filter::onUpstreamAbort function calls sendLocalReply and it doesn't call finalizeResponseHeaders in its headers callback, so response_headers_to_add are not used anyways.
So there are two things to do:
add %REQ(x-request-id)% to response_headers_to_add
add a finalizeResponseHeaders call to onUpstreamAbort
ascheglov
pushed a commit
to ascheglov/envoy
that referenced
this issue
Oct 28, 2019
Currently there is no way to use request headers in response_headers_to_add (it doesn't support
%REQ(header-name)%
).However it would be nice to have an access to certain headers, namely x-request-id.
Normally a backend would echo the x-request-id header, so that it would be proxied to a client.
When there is a request timeout, envoy sends the "504 upstream request timeout" reply, and the client doesn't get the x-request-id.
Although it might be useful to echo other envoy-generated request headers (e.g. uber-trace-id for traces), for now it would be sufficient to add the
%REQUEST_ID%
in StreamInfoHeaderFormatter, requestId in StreamInfo, and set it in the http connection manager together with setDownstreamRemoteAddress, after the ConnectionManagerUtility::mutateRequestHeaders call.The text was updated successfully, but these errors were encountered: