NJS - API Calls
xeioex at nginx.com
Mon Jun 3 17:39:41 UTC 2019
On 03.06.2019 20:27, naidile.pn wrote:
> Hi Team,
> Can you please let me know how to make external API calls within the JS
what do you mean by external API calls?
> I actually want to make API calls and modify the request before proxy
> passing th e request to a up stream server.
It is considered to a bad practice to modify client request directly.
Instead you can create a subrequest
(http://nginx.org/en/docs/njs/reference.html#subrequest) and modify it
in a sublocation. See as an example
> nginx-devel mailing list
> nginx-devel at nginx.org
More information about the nginx-devel