I am trying to configure the nginx proxy to another server only if the $ request_body variable matches a specific regular expression. But she does not work for me.
server{ listen 80 default; server_name www.applozic.com; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $http_host; if ($request_body ~* (.*)appId(.*)) { proxy_pass http:
}
request body:
{ "applicationId": "appId", "authenticationTypeId": 1, "enableEncryption": false, "notificationMode": 0, "deviceType": 4, }
proxy nginx
Ranjeet
source share