aboutsummaryrefslogtreecommitdiff
path: root/p/i
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2024-08-17 16:25:40 +0200
committerGravatar GitHub <noreply@github.com> 2024-08-17 16:25:40 +0200
commitbb61f698e8d3dcc980ea2a6a7c46d4905a1608c6 (patch)
tree4b51ad2745902a8f7123da0733c7fcd3f0cea471 /p/i
parentc480e571619c2e68000d85b866ef23c89ad83ddf (diff)
Fix HTTP cache of main page (#6719)
Revert bug introduce by https://github.com/FreshRSS/FreshRSS/pull/3096 in which username was always null, preventing HTTP cache from working and always returning 200 instead of 304. Discovered when checking https://github.com/FreshRSS/FreshRSS/pull/6718
Diffstat (limited to 'p/i')
-rw-r--r--p/i/index.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/p/i/index.php b/p/i/index.php
index 67536d0ad..96c8e52fb 100644
--- a/p/i/index.php
+++ b/p/i/index.php
@@ -32,6 +32,8 @@ if (!file_exists($applied_migrations_path)) {
require(APP_PATH . '/install.php');
} else {
session_cache_limiter('');
+ Minz_Session::init('FreshRSS');
+ Minz_Session::_param('keepAlive', 1); //To prevent the PHP session from expiring
if (!file_exists(DATA_PATH . '/no-cache.txt')) {
require(LIB_PATH . '/http-conditional.php');
@@ -42,8 +44,6 @@ if (!file_exists($applied_migrations_path)) {
@filemtime(DATA_PATH . '/config.php') ?: 0
);
if (httpConditional($dateLastModification ?: time(), 0, 0, false, PHP_COMPRESSION, true)) {
- Minz_Session::init('FreshRSS');
- Minz_Session::_param('keepAlive', 1); //To prevent the PHP session from expiring
exit(); //No need to send anything
}
}
@@ -56,7 +56,6 @@ if (!file_exists($applied_migrations_path)) {
FreshRSS_Context::initSystem();
$front_controller = new FreshRSS();
$front_controller->init();
- Minz_Session::_param('keepAlive', 1); //To prevent the PHP session from expiring
$front_controller->run();
} else {
$error = $result;