Keep remote site headers for caching
This commit is contained in:
parent
05cb4fd897
commit
4d8a815932
@ -12,10 +12,16 @@ class Sslify extends \Zotlabs\Web\Controller {
|
|||||||
list($k,$v) = array_map("trim", explode(":", trim($l), 2));
|
list($k,$v) = array_map("trim", explode(":", trim($l), 2));
|
||||||
$hdrs[strtolower($k)] = $v;
|
$hdrs[strtolower($k)] = $v;
|
||||||
}
|
}
|
||||||
if (array_key_exists('content-type', $hdrs)) {
|
|
||||||
$type = $hdrs['content-type'];
|
if (array_key_exists('content-type', $hdrs))
|
||||||
header('Content-Type: ' . $type);
|
header('Content-Type: ' . $hdrs['content-type']);
|
||||||
}
|
if (array_key_exists('last-modified', $hdrs))
|
||||||
|
header('Last-Modified: ' . $hdrs['last-modified']);
|
||||||
|
if (array_key_exists('cache-control', $hdrs))
|
||||||
|
header('Cache-Control: ' . $hdrs['cache-control']);
|
||||||
|
if (array_key_exists('expires', $hdrs))
|
||||||
|
header('Expires: ' . $hdrs['expires']);
|
||||||
|
|
||||||
|
|
||||||
echo $x['body'];
|
echo $x['body'];
|
||||||
killme();
|
killme();
|
||||||
|
Reference in New Issue
Block a user