You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
479 B
20 lines
479 B
<?php
|
|
|
|
$config = require "config.php";
|
|
require "misc/tools.php";
|
|
|
|
$url = $_REQUEST["url"];
|
|
$requested_root_domain = get_root_domain($url);
|
|
|
|
$allowed_domains = array("qwant.com", "wikimedia.org", get_root_domain($config->invidious_instance_for_video_results));
|
|
|
|
if (in_array($requested_root_domain, $allowed_domains))
|
|
{
|
|
$image = $url;
|
|
$image_src = request($image);
|
|
|
|
header("Content-Type: image/jpeg");
|
|
echo $image_src;
|
|
}
|
|
?>
|