Permalink
Browse files

Merge pull request #16 from Ajaxman/master

Prevents user from using back button after logout
  • Loading branch information...
2 parents 74c80fa + 644f154 commit 4d5d92d168165cb6359e4a8d374eea6f21b54fc6 Wouterrr committed Nov 17, 2011
Showing with 7 additions and 2 deletions.
  1. +5 −1 classes/a1/core.php
  2. +2 −1 config/a1.php
View
6 classes/a1/core.php
@@ -46,7 +46,11 @@ public static function instance($_name = 'a1')
{
throw new Kohana_Exception('This server does not support bcrypt hashing');
}
-
+
+ if($_config['cache']===FALSE)
+ {
+ Request::$initial->response()->headers("Cache-Control","no-store, no-cache, must-revalidate");
+ }
return $_instances[$_name];
}
View
3 config/a1.php
@@ -21,5 +21,6 @@
'session' => array(
'type' => 'native' // native or database
- )
+ ),
+ 'cache' => FALSE // Disabled/Enable cache-control
);

0 comments on commit 4d5d92d

Please sign in to comment.