Welcome! Log In Create A New Profile

Advanced

Re: verifying uploaded files with ClamAV before upstream

Calin Don
August 29, 2011 02:46AM
Take note that while you are processing the content using embedded Perl or
lua, the nginx worker which is processing is blocked, thus not serving
anything. It migth be a better solution to check for viruses inside your
webapp.

On Mon, Aug 29, 2011 at 01:01, Jérémie Pierson <lists@ruby-forum.com> wrote:

> Hi!
>
> I have a webapp that allows users to upload files. But before that
> webapp sees the files, I need to check them for viruses (with ClamAV).
> Requests are proxied by Nginx with a classic proxy_pass directive.
>
> I have tried tu use the embedded Perl module, without success.
>
> Specifically, I successfully got access to the body of the client
> request (i.e. the uploaded file's content), but have problem with the
> reply...
>
> If a virus is found, I want to reply with e.g. "403 Forbidden". But if
> the file is clean, I want the webapp to get it via proxy_pass as
> usual. I could only manage either always 403, or always pass to upstream
> :-(
>
> Is it possible to do that with the Perl module? I would prefer that
> solution as I don't have much time for the alternative :-)
>
> If not, could I write a handler module to do that? I read Evan Miller's
> guide to Nginx modules, but I'm not sure how to pass control to another
> handler in the "no-virus" case.
>
>
>
> --
> Jérémie
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

verifying uploaded files with ClamAV before upstream

Jérémie Pierson August 28, 2011 06:02PM

Re: verifying uploaded files with ClamAV before upstream

Calin Don August 29, 2011 02:46AM

Re: verifying uploaded files with ClamAV before upstream

splitice August 29, 2011 02:56AM

Re: verifying uploaded files with ClamAV before upstream

Jérémie Pierson August 29, 2011 08:40PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 289
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready