MDL-85323 core: Don't cache the login page

This commit is contained in:
Mark Johnson
2025-06-05 10:58:49 +07:00
committed by Huong Nguyen
parent cf9f6b8e80
commit 15e58709c8
2 changed files with 2 additions and 2 deletions
+1 -2
View File
@@ -1564,8 +1564,7 @@ function send_headers($contenttype, $cacheable = true) {
@header('Expires: ');
} else {
// Do everything we can to always prevent clients and proxies caching.
@header('Cache-Control: no-store, no-cache, must-revalidate');
@header('Cache-Control: post-check=0, pre-check=0, no-transform', false);
@header('Cache-Control: no-store, no-cache, must-revalidate, no-transform');
@header('Pragma: no-cache');
@header('Expires: Mon, 20 Aug 1969 09:23:00 GMT');
@header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
+1
View File
@@ -50,6 +50,7 @@ $context = context_system::instance();
$PAGE->set_url("$CFG->wwwroot/login/index.php");
$PAGE->set_context($context);
$PAGE->set_pagelayout('login');
$PAGE->set_cacheable(false);
/// Initialize variables
$errormsg = '';