Welcome! Log In Create A New Profile


Re: how to check for headers

Francis Daly
August 17, 2012 09:48AM
On Fri, Aug 17, 2012 at 06:23:04AM -0400, amonmitch wrote:

Hi there,

> How would you check for sth like HTTP:Accept-Language? and in general all
> headers? if it is equal to some value, empty or etc. Apache would allow this
> to be checked in a notation similar to the following inside a mod_rewrite
> config:
> %{HTTP:Accept-Language}
> Is there a similar variable to be used in nginx config?

variables are at

"map" is at http://nginx.org/r/map

"if" is at http://nginx.org/r/if

Be aware of when you shouldn't use "if" inside "location", such as is
written at http://wiki.nginx.org/IfIsEvil

Depending on what exactly you want to do, frequently "map" can be used
instead of "if".

Francis Daly francis@daoine.org

nginx mailing list
Subject Author Posted

how to check for headers

amonmitch August 17, 2012 06:23AM

Re: how to check for headers

Francis Daly August 17, 2012 09:48AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 341
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