title: Replace request body in NGINX proxy for POST
body: <p>I'm trying to use NGINX to proxy a request that needs to do a bit of magic in the middle.  Essentially I have a client that can only send an unauthenticated GET request, and I need to receive this request, make a POST that will login to a server using static credentials stored in the NGINX config, and replace the response body with an html redirect.  This will work for my scenario because the POST response will contain a Set-Cookie header with a session id representing the authenticated session.  I know I can use <code>proxy_method</code> to force NGINX to make the outbound call via POST, and I can use <code>sub_filter</code> to replace the POST response with the html redirect.  My question is how can I set a request body that will get sent in the POST request?</p>
  
  <p>Any ideas?</p>
  
  <p>Ian</p>