I am trying to configure nginx to proxy pass the request to another server, only if the $request_body variable matches on a specific regular expression.But it is not working for
As best I can tell the issue is that the variable $request_body may not have been read into memory at the time your if statement is executing.
$request_body
Suggested alternatives would be to use the lua support or compile nginx with the echo modules and run echo_request_body.