Welcome! Log In Create A New Profile

Advanced

allow traffic through with a certain header value

June 19, 2018 03:34PM
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 ....
Subject Author Posted

allow traffic through with a certain header value

vchhabra@medallia.com June 19, 2018 03:34PM

Re: allow traffic through with a certain header value

Francis Daly June 20, 2018 11:16AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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