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