1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-11 00:54:08 +02:00

Compile: Move caching headers to file.inc.php

This commit is contained in:
Jakub Vrana
2025-03-16 17:16:23 +01:00
parent d20cbf14e7
commit 529197f403
2 changed files with 10 additions and 18 deletions

View File

@@ -1,8 +1,15 @@
<?php
namespace Adminer;
// this is matched by compile.php
// caching headers added in compile.php
if (substr($VERSION, -4) != '-dev') {
if ($_SERVER["HTTP_IF_MODIFIED_SINCE"]) {
header("HTTP/1.1 304 Not Modified");
exit;
}
header("Expires: " . gmdate("D, d M Y H:i:s", time() + 365*24*60*60) . " GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: immutable");
}
if ($_GET["file"] == "favicon.ico") {
header("Content-Type: image/x-icon");