Nginx with a ICAP-like front-end

Alder Netw aldernetwork at gmail.com
Mon Feb 27 17:00:13 UTC 2017


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.sebastian at gmail.com> wrote:

> 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 {
>     proxy_pass http://realbackend;
> }
>
>
> On Mon, Feb 27, 2017 at 3:41 AM, Alder Netw <aldernetwork at gmail.com>
> wrote:
>
>> 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 <aldernetwork at gmail.com>
>> wrote:
>>
>>> 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 will be forwarded to R and R will
>>> return directly to clients; Upon failure, the request will be denied.
>>>
>>> Is there any easy nginx config which can achieve this? Thanks,
>>>
>>> - Alder
>>>
>>
>>
>> _______________________________________________
>> nginx mailing list
>> nginx at nginx.org
>> http://mailman.nginx.org/mailman/listinfo/nginx
>>
>
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20170227/92b45f15/attachment.html>


More information about the nginx mailing list