Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

Parse JSON POST request into nginx variable (1 reply)

$
0
0
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": "test.mydomain.com", "more-stuff": "here"}';
// I want to get
$account = "test.mydomain.com";
proxy_pass $account/rest/of/url/here;

Viewing all articles
Browse latest Browse all 7229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>