Getting environment variables and request headers

Hi, I am trying to get environment variables (any) and http headers, is
there a specific way to get them in config? As an example, I need (as
apache) %{HTTP:Authorization} , what is the corresponding variable in
nginx for this?

Hello!

On Thu, Mar 12, 2009 at 02:46:51PM +0200, Anıl Çetin wrote:

Hi, I am trying to get environment variables (any) and http headers, is
there a specific way to get them in config? As an example, I need (as
apache) %{HTTP:Authorization} , what is the corresponding variable in
nginx for this?

http://www.nginx-community.org/NginxHttpCoreModule#Variables

$http_authorization

Maxim D.

mod_parsed_vars http://hg.mperillo.ath.cx/nginx/mod_parsed_vars did
this
job. Other else modify the http access key module. :slight_smile:

Thanks for answers. I am confused about apache, I thought that
%{HTTP_USER_AGENT} != %{HTTP:User-Agent} and so on. Also I know that
there is a wiki and read all of them of course :slight_smile: Just check
http://www.anilcetin.com/convert-apache-htaccess-to-nginx/ I did this
yesterday and now I am trying to make it more stable.

Is’nt it possible to do things like below without mod_parsed_vars?

if($env_something != “1”){
setenv something=1;
}

??? yazmış: