Hi Nginx Forum
    This is my first posting here.

I'm trying to configure an application to only allow traffic if a certain
header value matches exactly.  I'm trying the "if" statement below in my
nginx app config file, but doesn't seem to quite work.     It just gives a
403 for every request.    If I change the != to = it allows allows all
traffic through.  "nginx -T" doesn't report any issues.      Any suggestions
on what else might be required?   Thanks a lot.

    location / {
         if ($http_headerkey != "headervalue") {
         return 403; }
allow ....
allow ....

Posted at Nginx Forum: 
https://forum.nginx.org/read.php?2,280181,280181#msg-280181

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

Reply via email to