From 954337c8f449503ac70b6ce1acdcc40dc75790b8 Mon Sep 17 00:00:00 2001 From: Remigijus Kiminas Date: Tue, 5 Oct 2021 05:14:31 -0400 Subject: [PATCH] No cache for logged sessions --- lhc_web/lib/core/lhcore/lhmodule.php | 3 +++ lhc_web/modules/lhchat/chat.php | 4 ++++ lhc_web/modules/lhchat/chatwidgetchat.php | 3 +++ 3 files changed, 10 insertions(+) diff --git a/lhc_web/lib/core/lhcore/lhmodule.php b/lhc_web/lib/core/lhcore/lhmodule.php index 6bb46d1352..2b76d13c72 100644 --- a/lhc_web/lib/core/lhcore/lhmodule.php +++ b/lhc_web/lib/core/lhcore/lhmodule.php @@ -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'])) { diff --git a/lhc_web/modules/lhchat/chat.php b/lhc_web/modules/lhchat/chat.php index e49e16579b..daff1ca05c 100644 --- a/lhc_web/modules/lhchat/chat.php +++ b/lhc_web/modules/lhchat/chat.php @@ -1,5 +1,9 @@ 0) { diff --git a/lhc_web/modules/lhchat/chatwidgetchat.php b/lhc_web/modules/lhchat/chatwidgetchat.php index e54f665bac..fdc2a35245 100644 --- a/lhc_web/modules/lhchat/chatwidgetchat.php +++ b/lhc_web/modules/lhchat/chatwidgetchat.php @@ -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');