Skip to content
Snippets Groups Projects
Commit 8d753c79 authored by Jonas Leder's avatar Jonas Leder
Browse files

fix mime of svg image

parent 66048dff
No related branches found
No related tags found
No related merge requests found
Pipeline #519 passed
......@@ -6,8 +6,10 @@ if( isset( $_GET['imgID'] ) )
{
if($_GET['imgID'] == "1") {
$url = "https://ipv6.he.net/certification/create_badge.php?pass_name=jonasled&badge=3";
$mime = "image/png";
} else if($_GET['imgID'] == "2"){
$url = "https://www.abuseipdb.com/contributor/45130.svg";
$mime = "image/svg+xml";
} else {
die("wrong image id");
}
......@@ -18,7 +20,7 @@ else
}
$imginfo = getimagesize( $url );
header("Content-type: ".$imginfo['mime']);
header("Content-type: ".$mime);
readfile( $url );
?>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment