Hello!
On Mon, Oct 26, 2015 at 11:42 PM, Rabi Chandra Shah wrote:
> I am trying to build a common API Gateway. I'm thinking of doing it via
> NGINX. So my use case is,
> on the basis of request headers, I want to redirect to some internal APIs.
>
> e.g.
>
>
> if ( request_headers.ANDROID_VERSION == 4.1.1 ) {
> redirect to http://127.0.0.1:9000/api
> }
>
I guess you just need the "internal redirect" thing here. I don't know
your concrete context, but you can check out the following:
https://github.com/openresty/echo-nginx-module#echo_exec
https://github.com/openresty/lua-nginx-module#ngxexec
BTW, this is a Chinese mailing list. English posts should go to the
openresty-en mailing list instead. Please see
https://openresty.org/#Community for more details. Thanks for your
cooperation.
Regards,
-agentzh