Remove ability in channels.php
to download whole archive for not leaking API keys used
This commit is contained in:
parent
b4cb072770
commit
a0ba474fcc
@ -14,12 +14,10 @@
|
|||||||
|
|
||||||
$uri = $_SERVER['REQUEST_URI'];
|
$uri = $_SERVER['REQUEST_URI'];
|
||||||
$uri = str_replace('/channels/', '', $uri);
|
$uri = str_replace('/channels/', '', $uri);
|
||||||
$uri = "/mnt/HDD0/YouTube_captions_search_engine/channels/$uri";
|
|
||||||
if (str_contains('/', $uri)) {
|
|
||||||
$uri = str_replace('/', '#', $uri);
|
$uri = str_replace('/', '#', $uri);
|
||||||
|
$uri = "/mnt/HDD0/YouTube_captions_search_engine/channels/$uri";
|
||||||
header('Content-Type: application/json; charset=UTF-8');
|
header('Content-Type: application/json; charset=UTF-8');
|
||||||
echo file_get_contents("zip://$uri");
|
$content = file_get_contents("zip://$uri");
|
||||||
} else {
|
echo stripFirstLine($content);
|
||||||
header("Content-Type: application/zip");
|
|
||||||
echo readfile($uri);
|
?>
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user