<div dir="ltr"><div><br class="gmail-Apple-interchange-newline">Hi,</div><div><br></div><div>Tried to search on this for a couple of hours, but had no luck, hoping you guys can help.</div><div><br></div><div>I have a use case, that I need to proxy the request to server-A first, then if returns 200, then it'll query server-B and return that result.  If it returned != 200, just return 404.  Something like this:</div><div><br></div><div>function pseudoCode() {</div><div>  if (server-a.process() == 200) {</div><div>    return server-b.process()</div><div>  }</div><div><br></div><div>  // Got a non-200 from server-a, just return 404</div><div>  return 404<br></div><div>}</div><div><br></div><div>Is there a straightforward way of doing this in nginx?</div><div><br></div><div>Thanks!</div><div>Jason</div></div>