I need to enable client certificate verification only for requests from outside of our intranet without verification for requests from, for example, 192.168.0.0/24. I tried to use geo
module to define variable for internal subnet.
In http
context:
geo $intranet {
default 0;
192.168.0.0/24 1;
}
In server
context
if ($intranet != 1) {
ssl_verify_client on;
}
but it is impossible to use ssl_verify_client
directive inside if
statement. I get an error:
"ssl_verify_client" directive is not allowed here
Is there other way to do this?