Welcome! Log In Create A New Profile


Re: How can I get nginx to support trailers

April 05, 2024 01:04PM
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.
Subject Author Posted

How can I get nginx to support trailers

tas7al April 04, 2024 04:00PM

Re: How can I get nginx to support trailers

tas7al April 05, 2024 01:04PM

Re: How can I get nginx to support trailers

ksi9292 May 08, 2024 11:43PM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 212
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready