envoyproxy / envoyproxy/envoy

Accessing request headers in envoy_on_response (lua HTTP filter).

Aperta
#4,613 16 commenti 17 reazioni 0 assegnatari Vedi su GitHub
area/lua help wanted
Lingua principale
C++
Stelle
28.9k
Fork
5.6k
Merge medio
1g 22h
PR unite (30g)
430

Descrizione

I'm trying to use a [lua HTTP filter](https://www.envoyproxy.io/docs/envoy/latest/configuration/http_filters/lua_filter) to set a response header whose value depends on a request header.

As a simple example, suppose we want to copy a header from the request to the response. How can we do this using a lua filter?

Maybe we can store the request header in a "global" table during `envoy_on_request` and read it later when `envoy_on_response` is called. However, even if this approach makes sense, how can we correlate responses with requests to be able to do this?

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.