summaryrefslogtreecommitdiff
path: root/backend.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-03-14 16:48:47 +0300
committerAndrew Dolgov <[email protected]>2018-03-14 16:48:47 +0300
commit80905f7477c9c714fe58023e91dfa18f9eede03b (patch)
treeeec227102c823b4f168980f5251a7f165dccd745 /backend.php
parent80910996b07527f0941560bca5b598286a16ff9f (diff)
use expires: for covers
Diffstat (limited to 'backend.php')
-rw-r--r--backend.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/backend.php b/backend.php
index 999feb5..a749f60 100644
--- a/backend.php
+++ b/backend.php
@@ -4,6 +4,8 @@
header("Content-type: text/json");
+ define('STATIC_EXPIRES', 86400*14);
+
// let's not start a session if there's no cookie, login is impossible
// via backend anyway
if (!isset($_COOKIE['epube_sid'])) {
@@ -44,7 +46,8 @@
$base_filename = basename($filename);
header("Content-type: " . mime_content_type($filename));
- header('Cache-control: max-age= ' . (86400*24));
+ header('Cache-control: max-age=' . STATIC_EXPIRES);
+ header("Expires: " . gmdate("D, d M Y H:i:s \G\M\T", time()+STATIC_EXPIRES));
readfile($filename);
} else {