2022-06-27 17:00:22 -04:00
|
|
|
<?php
|
|
|
|
|
2022-07-08 15:52:26 -04:00
|
|
|
$config = require "config.php";
|
|
|
|
require "misc/tools.php";
|
2022-06-27 17:00:22 -04:00
|
|
|
|
2022-08-28 14:41:33 -04:00
|
|
|
$url = $_REQUEST["url"];
|
2023-01-27 14:17:57 -03:00
|
|
|
$requested_root_domain = get_root_domain($url);
|
2022-07-08 15:52:26 -04:00
|
|
|
|
2023-01-27 14:17:57 -03:00
|
|
|
$allowed_domains = array("qwant.com", "wikimedia.org", get_root_domain($config->invidious_instance_for_video_results));
|
2022-09-03 13:45:47 -04:00
|
|
|
|
2023-01-27 14:17:57 -03:00
|
|
|
if (in_array($requested_root_domain, $allowed_domains))
|
2022-08-28 14:41:33 -04:00
|
|
|
{
|
|
|
|
$image = $url;
|
|
|
|
$image_src = request($image);
|
|
|
|
|
2023-02-05 05:55:28 -03:00
|
|
|
header("Content-Type: image/png");
|
2022-08-28 14:41:33 -04:00
|
|
|
echo $image_src;
|
|
|
|
}
|
2022-06-27 17:00:22 -04:00
|
|
|
?>
|