mirror of
https://github.com/Ahwxorg/Binternet.git
synced 2026-03-11 08:54:37 +00:00
feat(image_proxy.php): fix some issues
This commit is contained in:
parent
92289e837b
commit
3719a922de
1 changed files with 8 additions and 3 deletions
|
|
@ -3,12 +3,17 @@
|
|||
require "misc/tools.php";
|
||||
|
||||
$url = $_REQUEST["url"];
|
||||
$requested_root_domain = get_root_domain($url);
|
||||
|
||||
$allowed_domains = array("pinimg.com", "i.pinimg.com", "pinterest.com");
|
||||
|
||||
if (in_array(get_root_domain($url), $allowed_domains))
|
||||
if (in_array($requested_root_domain, $allowed_domains))
|
||||
{
|
||||
header("Content-type: image/jpeg");
|
||||
echo request($url);
|
||||
$image = $url;
|
||||
$image_src = request($image);
|
||||
|
||||
header("Content-Type: image/png");
|
||||
echo $image_src;
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
Loading…
Reference in a new issue