Parse JSON POST request into nginx variable

justink101 nginx-forum at
Sun Jun 15 01:48:13 UTC 2014

How can I read a POST request body which is JSON and get a property?  I need
to read a property and use it as a variable in proxy_pass.

Pseudo code:

   $post_request_body = '{"account": "", "more-stuff":
   // I want to get
   $account = "";
   proxy_pass $account/rest/of/url/here;

Posted at Nginx Forum:,250864,250864#msg-250864

More information about the nginx mailing list