tas7al Wrote:
-------------------------------------------------------
> Hi folks!
>
> I have an nginx instance to proxy requests for a service that I have
> and I'm having trouble passing trailers.
>
> If I curl my service directly I see the appropriate trailers that I
> set-up be returned. However I don't see the trailers when I curl on
> nginx which leads me to believe nginx is stripping the trailers.
>
> I added a "TE: trailers" header to our request and in our nginx
> configs tried using:
> "add_trailer Xstatus $sent_trailer_xstatus" and even
> "add_trailer Xstatus $upstream_trailer_xstatus"
> But I still don't see the trailers being returned
> Is there any way to get trailers working with "proxy_pass"?
>
> Could it be that we're just calling the wrong variable?
> And is there any way to see _all_ the template variable values
> returned by the req?
Just following up to clarify how the requests are being sent, a typical request:
client -> nginx -> service
The service makes a few calls and sends chunked requests back -> nginx -> client
I set a header like "Trailer: Xstatus" to the request in order for nginx and the service to expect it. The service is what sets this trailer and sends it back to nginx, and we are expecting nginx should ideally relay the trailer back to the client as well.
The service is appropriately sending back an Xstatus at the end of the request to nginx, I can see this when I curl the service directly.
However when I do an e2e req nginx is receiving this trailer from the service and not sending it back since no trailers are returned when I curl it directly.