Welcome! Log In Create A New Profile

Advanced

Re: x-security-header

Maxim Dounin
July 08, 2014 05:42PM
Hello!

On Tue, Jul 08, 2014 at 03:27:21PM -0400, matt_l wrote:

> Hello
>
> I am new to nginx. This is most likely a beginner question. I apologize in
> advance.
>
> I have a client that is sending http request with an x-security-header:
> a6rb35723926d2c685c2d7ud3034179828blablabla
>
> How can I configure nginx so that if the x-security-header is not present
> then the request is rejected?

Conditional processing like this can be implemented using
directives of the rewrite module, "if" and "return" in particular:

if ($http_x_security_header != "a6rb35723926d2c685c2d7ud3034179828blablabla") {
return 403;
}

See here for details:

http://nginx.org/r/if
http://nginx.org/r/return

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

x-security-header

matt_l July 08, 2014 03:27PM

Re: x-security-header

Maxim Dounin July 08, 2014 05:42PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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