Skip to content

Commit

Permalink
No cache for logged sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
remdex committed Oct 5, 2021
1 parent 1f6a513 commit 954337c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lhc_web/lib/core/lhcore/lhmodule.php
Expand Up @@ -38,6 +38,9 @@ static function runModule()
{
// Just to start session
$currentUser = erLhcoreClassUser::instance();
header('Cache-Control: nocache, no-store, max-age=0, must-revalidate');
header('Pragma: no-cache');
header('Expires: Sun, 02 Jan 1990 00:00:00 GMT');

if (!$currentUser->hasAccessTo('lh'.self::$currentModuleName,$Params['module']['functions']))
{
Expand Down
4 changes: 4 additions & 0 deletions lhc_web/modules/lhchat/chat.php
@@ -1,5 +1,9 @@
<?php

header('Cache-Control: nocache, no-store, max-age=0, must-revalidate');
header('Pragma: no-cache');
header('Expires: Sun, 02 Jan 1990 00:00:00 GMT');

$tpl = erLhcoreClassTemplate::getInstance( 'lhchat/chat.tpl.php');

if (isset($Params['user_parameters_unordered']['theme']) && (int)$Params['user_parameters_unordered']['theme'] > 0) {
Expand Down
3 changes: 3 additions & 0 deletions lhc_web/modules/lhchat/chatwidgetchat.php
Expand Up @@ -2,6 +2,9 @@

// For IE to support headers if chat is installed on different domain
header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');
header('Cache-Control: nocache, no-store, max-age=0, must-revalidate');
header('Pragma: no-cache');
header('Expires: Sun, 02 Jan 1990 00:00:00 GMT');

$tpl = erLhcoreClassTemplate::getInstance( 'lhchat/chat.tpl.php');

Expand Down

0 comments on commit 954337c

Please sign in to comment.