X-security-header

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?

Thank you very much for your help.

-matt

Posted at Nginx Forum:

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 D.
http://nginx.org/