Re: Nginx - API Gateway is not forwarding the request to Auth Service

2017-04-13 Thread Francis Daly
On Thu, Apr 13, 2017 at 01:00:20AM -0400, zaidahmd wrote: Hi there, > > I've read your description, and I confess I'm not sure what benefit > > auth_request within nginx gives you. It looks like your application is > > doing its own auth check on every request anyway, so having nginx do > > the s

Re: Nginx - API Gateway is not forwarding the request to Auth Service

2017-04-12 Thread zaidahmd
Hi Francis, > I've read your description, and I confess I'm not sure what benefit > auth_request within nginx gives you. It looks like your application is > doing its own auth check on every request anyway, so having nginx do > the same thing seems redundant. I'm probably missing something. can u

Re: Nginx - API Gateway is not forwarding the request to Auth Service

2017-04-12 Thread Francis Daly
On Wed, Apr 12, 2017 at 05:50:56AM -0400, zaidahmd wrote: Hi there, > Below I will explain my application with NGINX configuration I have > performed and the code snippets/references for future users. I've read your description, and I confess I'm not sure what benefit auth_request within nginx

Re: Nginx - API Gateway is not forwarding the request to Auth Service

2017-04-12 Thread zaidahmd
Hi Francis, Thanks for your interest. I would certainly like to contribute for the future implementers of NGINX reverse proxy with API gateway functionality. Below I will explain my application with NGINX configuration I have performed and the code snippets/references for future users. If you like

Re: Nginx - API Gateway is not forwarding the request to Auth Service

2017-04-11 Thread Francis Daly
On Tue, Apr 11, 2017 at 02:04:32AM -0400, zaidahmd wrote: Hi there, > This means my authentication service will be getting a subrequest to /login > everytime a request reaches nginx. And if the subrequest returns 401 then it > means the user needs to login. I'm not sure what your system design i

Re: Nginx - API Gateway is not forwarding the request to Auth Service

2017-04-11 Thread zaidahmd
Hi maxim, After implementing your valuable inputs I came across the following error in my application. Error: "Request 'GET /login' doesn't match 'POST /login" this means that nginx is sending GET requests to authentication service. So the flow is as follows and is according to your valuable f

Re: Nginx - API Gateway is not forwarding the request to Auth Service

2017-04-10 Thread zaidahmd
Hi Maxim, Thanks for the response. As you said below, > Instead, it issues a > subrequest for every incoming request, and allows further > processing of the request if and only if the subrequest returns > 200. This means my authentication service will be getting a subrequest to /login everyt

Re: Nginx - API Gateway is not forwarding the request to Auth Service

2017-04-10 Thread Maxim Dounin
Hello! On Mon, Apr 10, 2017 at 04:42:25AM -0400, zaidahmd wrote: > I am trying to implement the NGINX API gateway in nginx 1.10.3 community > version. I am facing the issue that NGINX is not forwarding the request to > authentication service. nginx configuration is pasted at the end of this > thr

Nginx - API Gateway is not forwarding the request to Auth Service

2017-04-10 Thread zaidahmd
Hi, I am trying to implement the NGINX API gateway in nginx 1.10.3 community version. I am facing the issue that NGINX is not forwarding the request to authentication service. nginx configuration is pasted at the end of this thread. I have written authentication service which is listening for lo