LibreY- privacy respecting meta search engine |
git clone git://git.acid.vegas/LibreY.git |
Log | Files | Refs | Archive | README | LICENSE |
image_proxy.php (528B)
1 <?php 2 3 $config = require "config.php"; 4 require "misc/tools.php"; 5 6 $url = $_REQUEST["url"]; 7 $requested_root_domain = get_root_domain($url); 8 9 $allowed_domains = array("s2.qwant.com", "s1.qwant.com", "upload.wikimedia.org", get_root_domain($config->invidious_instance_for_video_results)); 10 11 if (in_array($requested_root_domain, $allowed_domains)) 12 { 13 $image = $url; 14 $image_src = request($image, $config->curl_settings); 15 16 header("Content-Type: image/png"); 17 echo $image_src; 18 } 19 ?>