feat(html): minify static and dynamic html output

This commit is contained in:
Cory Dransfeldt 2025-04-14 09:31:07 -07:00
parent b6d5933433
commit f4b6436460
No known key found for this signature in database
18 changed files with 305 additions and 7 deletions

View file

@ -3,6 +3,7 @@
require __DIR__ . "/../../server/utils/init.php";
use GuzzleHttp\Client;
use voku\helper\HtmlMin;
$requestUri = $_SERVER["REQUEST_URI"];
$url = trim(parse_url($requestUri, PHP_URL_PATH), "/");
@ -75,6 +76,8 @@
$ogImage = htmlspecialchars($movie["backdrop"] . "?class=w800", ENT_QUOTES, "UTF-8");
$fullUrl = "https://www.coryd.dev" . $requestUri;
ob_start();
header("Cache-Control: public, max-age=3600");
header("Expires: " . gmdate("D, d M Y H:i:s", time() + 3600) . " GMT");
?>