Welcome! Log In Create A New Profile

Advanced

if custom header exists

Posted by NatanFrei 
if custom header exists
August 21, 2011 08:44AM
Good day!

How to make this scheme?

Page generating with custom header (for example "X-Custom-Header: somevalue").
How to check if header exists?

for example:

location / {
if (exists "X-Custom-header") {
....
}

...
}
Re: if custom header exists
August 25, 2011 12:20PM
location / [
if ($http_x_custom_header) {
....
}
}

see http://wiki.nginx.org/HttpCoreModule#.24http_HEADER for more information.

Andrejs
Sorry, only registered users may post in this forum.

Click here to login

Online Users

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