Welcome! Log In Create A New Profile

Advanced

Re: Nginx headers to be set at the time of request processing

November 28, 2016 06:56PM
Francis Daly Wrote:
-------------------------------------------------------
> On Wed, Nov 23, 2016 at 01:22:42PM -0500, Sushma wrote:
>
> Hi there,
>
> > I understand that proxy_set_header sets headers before proxying the
> > request to the upstream server.
>
> proxy_set_header adds extra http headers to the request that nginx
> sends to its upstream as part of the proxy_pass configuration.
>
> > Is there some way I can set the headers at the time of request
> > processing itself not just before proxying to upstream servers?
>
> I do not know what you mean by that question.
>
> What headers are you referring to, specifically?

CeeGeeDev wrote:
-------------------------------------------------------
> To be clear, this is for a custom http module we wrote. We want it to
> know about request headers that we set in the nginx.conf (for
> proxy_pass etc). But it doesn't seem like the custom module receives
> the modified request headers. Is there any way to both a) set a
> request header for proxy_pass but also b) have custom http module
> code living inside the same nginx also process the request that has
> these alterations to the set of request headers?

So for the benefit of the community: our plan is to implement a custom configuration directive in our http module to allow us to inform ourselves about various header overrides made in the nginx configuration file that should override various request headers in the actual request data structures during request processing in our http module code (in our business logic only... will have no effect on downstream request header values). There seems to be no built-in alternative for nginx custom http module developers (apologies if this question is better suited to the development list), at least none that we can find documented anywhere. Thanks
Subject Author Posted

Nginx headers to be set at the time of request processing

Sushma November 23, 2016 01:22PM

Re: Nginx headers to be set at the time of request processing

Francis Daly November 23, 2016 03:22PM

Re: Nginx headers to be set at the time of request processing

CeeGeeDev November 28, 2016 06:56PM

Re: Nginx headers to be set at the time of request processing

Francis Daly November 29, 2016 08:06AM

Re: Nginx headers to be set at the time of request processing

CeeGeeDev December 01, 2016 12:26PM

Re: Nginx headers to be set at the time of request processing

CeeGeeDev November 23, 2016 04:12PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 107
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready