Bug 37603 - Protect static files served by Apache
Summary: Protect static files served by Apache
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-08 23:49 UTC by David Cook
Modified: 2024-08-08 23:58 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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...