Browse Source

Protocol-relative URLs for open graph #546

Tobias Reich 8 years ago
parent
commit
70cd7f8a47
1 changed files with 2 additions and 2 deletions
  1. 2 2
      php/helpers/getGraphHeader.php

+ 2 - 2
php/helpers/getGraphHeader.php

@@ -24,8 +24,8 @@ function getGraphHeader($photoID) {
 	else                    $dir = 'big';
 
 	$parseUrl = parse_url('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
-	$url      = $parseUrl['scheme'] . '://' . $parseUrl['host'] . $parseUrl['path'] . '?' . $parseUrl['query'];
-	$picture  = $parseUrl['scheme'] . '://' . $parseUrl['host'] . $parseUrl['path'] . '/../uploads/' . $dir . '/' . $row->url;
+	$url      = '//' . $parseUrl['host'] . $parseUrl['path'] . '?' . $parseUrl['query'];
+	$picture  = '//' . $parseUrl['host'] . $parseUrl['path'] . '/../uploads/' . $dir . '/' . $row->url;
 
 	$url     = htmlentities($url);
 	$picture = htmlentities($picture);