1
0
mirror of https://github.com/mosbth/cimage.git synced 2025-08-29 10:29:47 +02:00

One can now add a HTTP header for Cache-Control in the config file, #109.

This commit is contained in:
Mikael Roos
2015-10-21 01:12:10 +02:00
parent db5ce71926
commit ee9fdb8474
4 changed files with 53 additions and 2 deletions

View File

@@ -928,6 +928,18 @@ $cachePath = getConfig('cache_path', __DIR__ . '/../cache/');
/**
* Get the cachepath from config.
*/
$cacheControl = getConfig('cache_control', null);
if ($cacheControl) {
verbose("cacheControl = $cacheControl");
$img->addHTTPHeader("Cache-Control", $cacheControl);
}
/**
* Prepare a dummy image and use it as source image.
*/