Re: Nginx with a ICAP-like front-end

2017-02-28 Thread Alder Netw
Rajeev, you meant asking the validator or client to set X-Accel-Redirect? Could you elaborate here? Thanks, On Mon, Feb 27, 2017 at 9:14 AM, Rajeev J Sebastian < rajeev.sebast...@gmail.com> wrote: > Adler, maybe you should try X-Accel-Redirect to avoid this conversion of > POST to GET? > > On Mon

Re: Nginx with a ICAP-like front-end

2017-02-27 Thread Rajeev J Sebastian
Adler, maybe you should try X-Accel-Redirect to avoid this conversion of POST to GET? On Mon, Feb 27, 2017 at 10:41 PM, Rajeev J Sebastian < rajeev.sebast...@gmail.com> wrote: > From the docs it seems that this will work for all requests EXCEPT that, > the @success fallback request will always be

Re: Nginx with a ICAP-like front-end

2017-02-27 Thread Rajeev J Sebastian
>From the docs it seems that this will work for all requests EXCEPT that, the @success fallback request will always be GET. On Mon, Feb 27, 2017 at 10:30 PM, Alder Netw wrote: > Thanks Rajeev for the recipe, I was looking into using subrequest but > found subrequest > only works for filter modul

Re: Nginx with a ICAP-like front-end

2017-02-27 Thread Alder Netw
Thanks Rajeev for the recipe, I was looking into using subrequest but found subrequest only works for filter module. This looks much simpler! The only concern is error_page is only for GET/HEAD not for POST? On Sun, Feb 26, 2017 at 11:48 PM, Rajeev J Sebastian < rajeev.sebast...@gmail.com> wrote

Re: Nginx with a ICAP-like front-end

2017-02-26 Thread Rajeev J Sebastian
Not sure if this is foolproof ... but maybe you can use the error_page fallback by responding with a special status_code. http://nginx.org/en/docs/http/ngx_http_core_module.html#error_page location / { proxy_pass http://validator; error_page 510 = @success; } location @success { pro

Re: Nginx with a ICAP-like front-end

2017-02-26 Thread Alder Netw
Or is there any existing module that can be adapted to achieve this? Appreciate if someone can shed some light. Thx, - Alder On Sat, Feb 25, 2017 at 9:24 PM, Alder Netw wrote: > Hi I want to add an ICAP-like front-end validation server V with nginx. > The user scenario is like this: > > The clie

Nginx with a ICAP-like front-end

2017-02-25 Thread Alder Netw
Hi I want to add an ICAP-like front-end validation server V with nginx. The user scenario is like this: The client will usually access the real app server R via nginx, but with a validation server V, the client request will first pass to V, V will dp certain validation and upon sucess the request