Added auth support and a helper script, targeting frankenphp
This commit is contained in:
parent
8f545c3f67
commit
0783e08fe9
8 changed files with 655 additions and 4 deletions
|
|
@ -2,8 +2,11 @@
|
|||
/**
|
||||
* serve_media.php - Serves media files with proper headers for streaming + Range
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
require_once __DIR__ . '/auth.php';
|
||||
require_auth(false); // plain text is fine for media endpoint
|
||||
set_time_limit(0);
|
||||
|
||||
|
||||
// ---- Config (prefer env vars in production) ----
|
||||
$homeDir = getenv('HOME') ?: (getenv('USERPROFILE') ?: ('/home/' . get_current_user()));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue