]> i-scream Git - www.i-scream.org.git/blobdiff - cgi-bin/logo.cgi
Use non-http URLs so the site works on https.
[www.i-scream.org.git] / cgi-bin / logo.cgi
index 25ab78dfed206dfd9bea15cde2c18461e295b302..69aaf8dc4a08d0cf62fe7a6123472b1cc44b24ad 100755 (executable)
@@ -9,7 +9,7 @@ my($dir) = "/web/i-scream/htdocs/logos";
 my($pattern) = "\\.jpg\$";
 
 # URL to images - must match $dir
-my($url) = "http://www.i-scream.org/logos";
+my($url) = "//www.i-scream.org/logos";
 
 # Where the setbg command is
 my($setbg) = "/web/i-scream/bin/setbg.pl";
@@ -19,6 +19,11 @@ my($imagepath) = `$setbg -r -p \'$pattern\' -b echo -f \' \' $dir`;
 chomp $imagepath;
 $imagepath =~ s/$dir/$url/;
 
+# Check for IPv6
+if($ENV{SERVER_ADDR} =~ /:/) {
+       $imagepath = "//www.i-scream.org/images/ipv6-logo.gif";
+}
+
 print "Content-type: text/plain\n\n";
 print $imagepath;