feat(og-image.php): proxy open graph + meta images to mitigate cases where query params required by cdn may break requests
This commit is contained in:
parent
b6dab4831f
commit
6596fe5134
16 changed files with 64 additions and 20 deletions
|
@ -73,7 +73,7 @@
|
|||
ENT_QUOTES,
|
||||
"UTF-8"
|
||||
), 250);
|
||||
$ogImage = htmlspecialchars($artist["image"] . "?class=w800", ENT_QUOTES, "UTF-8");
|
||||
$ogImage = htmlspecialchars($artist["image"], ENT_QUOTES, "UTF-8");
|
||||
$fullUrl = "https://www.coryd.dev" . $requestUri;
|
||||
|
||||
ob_start();
|
||||
|
|
|
@ -96,7 +96,7 @@
|
|||
ENT_QUOTES,
|
||||
"UTF-8"
|
||||
), 250);
|
||||
$ogImage = htmlspecialchars($book["image"] . "?class=w800", ENT_QUOTES, "UTF-8");
|
||||
$ogImage = htmlspecialchars($book["image"], ENT_QUOTES, "UTF-8");
|
||||
$fullUrl = "https://www.coryd.dev" . $requestUri;
|
||||
|
||||
ob_start();
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
|
||||
$pageTitle = htmlspecialchars("Genres • " . $genre["name"], ENT_QUOTES, "UTF-8");
|
||||
$pageDescription = truncateText(htmlspecialchars(strip_tags($genre["description"]), ENT_QUOTES, "UTF-8"), 250);
|
||||
$ogImage = htmlspecialchars($genre["artists"][0]["image"] . "?class=w800", ENT_QUOTES, "UTF-8");
|
||||
$ogImage = htmlspecialchars($genre["artists"][0]["image"], ENT_QUOTES, "UTF-8");
|
||||
$fullUrl = "https://www.coryd.dev" . $requestUri;
|
||||
|
||||
ob_start();
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
ENT_QUOTES,
|
||||
"UTF-8"
|
||||
), 250);
|
||||
$ogImage = htmlspecialchars($movie["backdrop"] . "?class=w800", ENT_QUOTES, "UTF-8");
|
||||
$ogImage = htmlspecialchars($movie["backdrop"], ENT_QUOTES, "UTF-8");
|
||||
$fullUrl = "https://www.coryd.dev" . $requestUri;
|
||||
|
||||
ob_start();
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
|
||||
$pageTitle = htmlspecialchars("Show • " . $show["title"], ENT_QUOTES, "UTF-8");
|
||||
$pageDescription = truncateText(htmlspecialchars(strip_tags($show["description"]), ENT_QUOTES, "UTF-8"), 250);
|
||||
$ogImage = htmlspecialchars($show["image"] . "?class=w800", ENT_QUOTES, "UTF-8");
|
||||
$ogImage = htmlspecialchars($show["image"], ENT_QUOTES, "UTF-8");
|
||||
$fullUrl = "https://www.coryd.dev" . $requestUri;
|
||||
|
||||
ob_start();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue