Hello all,
I'm suffering strange problem with auth_request module. When I set variable by auth_request_set, some directive (like echo, proxy_set_header, proxy_pass) can see value, and others (in this same block - like set, if, rewrite) can't. My auth_request config looks like this:
auth_request "/auth";
auth_request_set $value $upstream_http_X_VALUE;
proxy_set_header X-VALUE $value;
location = /auth {
proxy_pass http://10.0.1.100:8080/user
proxy_pass_request_body off;
proxy_set_header X-User "user";
proxy_set_header Content-Length "";
}
I receive answer 200 from authenticator and header X-VALUE with value 2. In location block I can observe very odd things like:
location = '/test {
set $new $value;
echo "value=$value new=$new";
break;
}
curl -i 127.0.0.1/test
value=2 new=
----------------------------------------------------------------
location = '/test1 {
if ($value != 2){
echo $value;
}
}
curl -i 127.0.0.1/test1
2
I'm suffering strange problem with auth_request module. When I set variable by auth_request_set, some directive (like echo, proxy_set_header, proxy_pass) can see value, and others (in this same block - like set, if, rewrite) can't. My auth_request config looks like this:
auth_request "/auth";
auth_request_set $value $upstream_http_X_VALUE;
proxy_set_header X-VALUE $value;
location = /auth {
proxy_pass http://10.0.1.100:8080/user
proxy_pass_request_body off;
proxy_set_header X-User "user";
proxy_set_header Content-Length "";
}
I receive answer 200 from authenticator and header X-VALUE with value 2. In location block I can observe very odd things like:
location = '/test {
set $new $value;
echo "value=$value new=$new";
break;
}
curl -i 127.0.0.1/test
value=2 new=
----------------------------------------------------------------
location = '/test1 {
if ($value != 2){
echo $value;
}
}
curl -i 127.0.0.1/test1
2