envoyproxy/envoy

question: is the original authority available with a host rewrite?

Open

#13,834 创建于 2020年10月30日

在 GitHub 查看
 (9 评论) (5 反应) (0 负责人)C++ (5,373 fork)batch import
area/access_logarea/httphelp wanted

仓库指标

Star
 (27,997 star)
PR 合并指标
 (平均合并 8天) (30 天内合并 378 个 PR)

描述

I'm trying to add the original destination (authority) of a request via an access log, or even an additional request header before it gets rewritten for the upstream cluster request. Is this information available somewhere?

An access log with... still logs the rewritten host.

action.Route.HostRewriteSpecifier = &envoyroute.RouteAction_HostRewrite{
	HostRewrite: "my-new-upstream-host,
}
"req_host":     "%REQ(:AUTHORITY)%"

We can use %REQ(X-ENVOY-ORIGINAL-PATH?:PATH)% for the original path. Is there something like that for the original authority?

贡献者指南