Input Headers. - headers_more_module.

Roberto De Ioris roberto at unbit.it
Thu Aug 30 17:21:47 UTC 2012


Il giorno 30/ago/2012, alle ore 19:12, David | StyleFlare <david at styleflare.com> ha scritto:

> I am trying to figure out what I dont see request headers added to the request.
> 
> I am trying to add 'X-Server-ID: $id'
> 
> Here is a snippet form my config.
> 
> location /{
>    more_set_input_headers 'X-Server-ID: $id';
>    more_set_headers 'X-Server-ID: $id';
> 
>    uwsgi_pass://upstream;
> }
> 
> 
> I see X-Server-ID sent in the response headers, but my upstream application does not seem to get the Header Variable.
> 
> I am not sure what I am doing wrong here. I read the docs here for explanation, but I cant seem to figure it out.
> http://wiki.nginx.org/HttpHeadersMoreModule
> and
> http://wiki.nginx.org/HttpUwsgiModule#Parameters_transferred_to_uWSGI-server.
> 

If you need to pass custom data to a uWSGI backend just use

uwsgi_param Server_ID $id;

(you can use whatever key name you want, it will be appended to the WSGI environ)

--
Roberto De Ioris
http://unbit.it
JID: roberto at jabber.unbit.it



More information about the nginx mailing list