Bug 37603

Summary: Protect static files served by Apache
Product: Koha Reporter: David Cook <dcook>
Component: Architecture, internals, and plumbingAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31380
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description David Cook 2024-08-08 23:49:38 UTC
There are times where it would be great to generate a large file in the background and then alert the user when it's ready to download.

The problem at the moment is that proxying with Plack::App::CGIBin can lead to timeouts, and serving directly with Apache means no authentication/authorization checks.

This morning I realised though that we could actually use mod_perl to write a Perl-based auth handler for Apache. (It looks like Nginx has a ngx_http_perl_module equivalent as well.)

It would mean bolting on another dependency, but it's an interesting idea...

Of course, an alternative would be to just go with something like bug 31380. That would be serving a static file via Starman, so it wouldn't be as efficient as Apache, but it wouldn't timeout like Plack::App::CGIBin...