mirror of
https://git.bakhai.co.in/FbIN/LibreY.git
synced 2025-11-08 05:10:07 +05:30
commit
c9898cf261
95 changed files with 5217 additions and 0 deletions
19
image_proxy.php
Normal file
19
image_proxy.php
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
$config = require_once "config.php";
|
||||
require_once "misc/tools.php";
|
||||
|
||||
$url = $_REQUEST["url"];
|
||||
$requested_root_domain = get_root_domain($url);
|
||||
|
||||
$allowed_domains = array("i.ytimg.com", "s2.qwant.com", "s1.qwant.com", "upload.wikimedia.org");
|
||||
|
||||
if (in_array($requested_root_domain, $allowed_domains))
|
||||
{
|
||||
$image = $url;
|
||||
$image_src = request($image, $config->curl_settings);
|
||||
|
||||
header("Content-Type: image/png");
|
||||
echo $image_src;
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue