envoyproxy/envoy

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

Open

#13.834 geöffnet am 30. Okt. 2020

Auf GitHub ansehen
 (9 Kommentare) (5 Reaktionen) (0 zugewiesene Personen)C++ (5.373 Forks)batch import
area/access_logarea/httphelp wanted

Repository-Metriken

Stars
 (27.997 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 8T) (378 gemergte PRs in 30 T)

Beschreibung

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?

Contributor Guide