Welcome! Log In Create A New Profile

Advanced

Nginx and lua headers change

Posted by trouble 
Nginx and lua headers change
November 22, 2023 04:24PM
I am building an app that needs me to redirect user based on headers from proxied app and from the access.

in nginx I want to redirect user based on two header variables, which when I put to header, they are shown correctly. But when using in if it is not working at all.
```
For logged in user I get isprotectedfalse and for guests I get isprotected
add_header X-User-Access-Flag $userinfo$arg_limit$upstream_http_c1_track_doc_type;
if ($http_x_user_access_flag = "isprotected") {
return 302 $scheme://$http_host$uri?limit=true;
}
```
why is it not redirecting?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

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