Making external http calls from nginx module

Sergey Brester serg.brester at sebres.de
Tue Aug 4 15:17:19 UTC 2015


 

Hi, 

You can try to use `ngx_http_subrequest` (don't know how good it works
for not an nginx location (or named location)). 

For example see some module used that (ex.:
https://github.com/sebres/nginx/blob/hg-mirror/src/http/modules/ngx_http_auth_request_module.c#L189).


You can also try to use a board directive `post_action` using pure
nginx-config solution, without writing own module - adding it to your
location should call external service specified within (but if I'm not
mistaken still unsupported/undocumented feature). 

Regards,
sebres 

04.08.2015 16:34, wrote sunil mallya: 

> Hey folks, 
> 
> Can someone point a code snippet on how I could make a http call to an external service within my module. I believe I should be able to reuse some of the code in ngx_proxy but unclear about the pitfalls. 
> 
> Muchos Gracias, 
> Sunil Mallya
> 
> @sunilmallya 
> 
> _______________________________________________
> nginx-devel mailing list
> nginx-devel at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel [1]
 

Links:
------
[1] http://mailman.nginx.org/mailman/listinfo/nginx-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20150804/22fbc6fb/attachment.html>


More information about the nginx-devel mailing list