Welcome! Log In Create A New Profile

Advanced

Re: Making external http calls from nginx module

Sergey Brester
August 04, 2015 11:18AM
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@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel [1]


Links:
------
[1] http://mailman.nginx.org/mailman/listinfo/nginx-devel
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Making external http calls from nginx module

sunil mallya 660 August 04, 2015 10:36AM

Re: Making external http calls from nginx module

Sergey Brester 370 August 04, 2015 11:18AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 195
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready