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?