Why does nginx strip trailing headers from a proxied backend? How can I prevent it?

Maxim Dounin mdounin at mdounin.ru
Tue Jun 9 01:51:23 UTC 2020


On Mon, Jun 08, 2020 at 10:29:23PM +0100, Alan Chandler wrote:

> On 08/06/2020 21:58, Maxim Dounin wrote:
> > 
> > On Mon, Jun 08, 2020 at 08:57:56PM +0100, Alan Chandler wrote:
> > 
> > > I have nginx acting as the static file server for a single page
> > > web app I am developing. It acts as a proxy server for the
> > > "/api" portion on my url space.
> > Trailers are only supported in gRPC proxying (grpc_pass), where
> > they are required for gRPC.  Trailers are not supported by
> > proxy_pass.
> > 
> That is a shame.

You are welcome to work on this if you think this is needed.  This 
should be relatively easy given that trailers infrastructure was 
added a while ago to support gRPC proxying.

Note though that there are security concerns about HTTP trailers 
in general, and these shouldn't be passed by default unless 
explicitly enabled in the configuration.

Just in case, an overview of trailers support in browsers can be 
found here (TL;DR: Firefox supports Server-Timing in trailers 
since 2018, and that's all):


Some lengthy discussion on trailers support happened in the past 
here (TL;DR: net effect is that there are no trailers support in 
the Fetch Standard now):


Maxim Dounin

More information about the nginx mailing list