Securing session cookie

How do I enable setSecure and useEncryption on the session cookie used by Phalcon\Session. I'm using the memcache apapter.

Thanks.



67.7k

$this->di->set('cookies', function(){

            $cookies = new \Phalcon\Http\Response\Cookies();

            return $cookies;
        });

        $this->di->set('crypt', function () {
            $crypt = new \Phalcon\Crypt();

            $crypt->setKey('#1dj8$=dp?.ak//j1V$'); // Use your own key!

            return $crypt;
        }, true);

https://docs.phalconphp.com/en/latest/reference/cookies.html