Allow to use Cache-Control
This commit is contained in:
parent
509a065caf
commit
dcdf147af1
@ -3,6 +3,9 @@
|
|||||||
Version 1.1-beta4 ()
|
Version 1.1-beta4 ()
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
* Allow to set $serendipity['CacheControl'] to make serendipity emit
|
||||||
|
Cache-Control: HTTP headers. Thanks to annonymous from the forums!
|
||||||
|
|
||||||
* Use seperate PHP session ID when using HTTPS login. Set 'secure'
|
* Use seperate PHP session ID when using HTTPS login. Set 'secure'
|
||||||
cookie parameters when using HTTPS. Thanks to lynoure!
|
cookie parameters when using HTTPS. Thanks to lynoure!
|
||||||
|
|
||||||
|
@ -23,6 +23,15 @@ header('X-Blog: Serendipity'); // Used for installer detection
|
|||||||
ob_start();
|
ob_start();
|
||||||
include('serendipity_config.inc.php');
|
include('serendipity_config.inc.php');
|
||||||
header('Content-Type: text/html; charset='. LANG_CHARSET);
|
header('Content-Type: text/html; charset='. LANG_CHARSET);
|
||||||
|
if ($serendipity['CacheControl']) {
|
||||||
|
if (!empty($HTTP_SERVER_VARS['SERVER_SOFTWARE']) && strstr($HTTP_SERVER_VARS['SERVER_SOFTWARE'], 'Apache/2')) {
|
||||||
|
header('Cache-Control: no-cache, pre-check=0, post-check=0');
|
||||||
|
} else {
|
||||||
|
header('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
|
||||||
|
}
|
||||||
|
header('Expires: 0');
|
||||||
|
header('Pragma: no-cache');
|
||||||
|
}
|
||||||
$track_referer = true;
|
$track_referer = true;
|
||||||
$uri = $_SERVER['REQUEST_URI'];
|
$uri = $_SERVER['REQUEST_URI'];
|
||||||
|
|
||||||
|
@ -87,6 +87,10 @@ if (!isset($serendipity['useHTTP-Auth'])) {
|
|||||||
$serendipity['useHTTP-Auth'] = true;
|
$serendipity['useHTTP-Auth'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset($serendipity['CacheControl'])) {
|
||||||
|
$serendipity['CacheControl'] = false;
|
||||||
|
}
|
||||||
|
|
||||||
// Should IFRAMEs be used for previewing entries and sending trackbacks?
|
// Should IFRAMEs be used for previewing entries and sending trackbacks?
|
||||||
$serendipity['use_iframe'] = true;
|
$serendipity['use_iframe'] = true;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user