aboutsummaryrefslogtreecommitdiffhomepage
path: root/routes/storage.php
diff options
context:
space:
mode:
Diffstat (limited to 'routes/storage.php')
-rw-r--r--routes/storage.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/routes/storage.php b/routes/storage.php
index 341770b..2ea0fc7 100644
--- a/routes/storage.php
+++ b/routes/storage.php
@@ -11,6 +11,7 @@ Router::getInstance()->mount('/storage/:oid', function (array $args) {
if ($obj == null) {
throw new NotFound('unknown object');
}
+ header('Cache-Control: max-age=604800'); // 1 week
header("Content-Disposition: inline; filename*=UTF-8''" . urlencode($obj->filename));
$obj->passthrough();
});
@@ -23,5 +24,6 @@ Router::getInstance()->mount('/upload/:token', function (array $args) {
if (!$storage->exists($token)) {
throw new NotFound('unknown object');
}
+ header('Cache-Control: max-age=604800'); // 1 week
$storage->passthrough($token);
}); \ No newline at end of file