How to configure cookies in Kohana

Put this in your bootstrap.php file:

Kohana_Cookie::$salt = md5('?jrA#VXrEH-f@?8!vuve6VCGgcjm#ar?BBAG'); //change it
Kohana_Cookie::$expiration = 86400; //1 day
Kohana_Cookie::$domain = '.mydomain.com';
Kohana_Cookie::$secure = TRUE; //allow cookies to be accessed only on a secure connection
Kohana_Cookie::$httponly = TRUE; //make cookies inaccessible to Javascript
Categories: Kohana, PHP Tags: , , ,
%d bloggers like this: