Howto set cookie_httponly?

So i have my code where i use session

$session->start();
if (...){
...
$session->set('session', $someVar);
}

And Ive got some problem when i try in console document.cookie. How can i set cookie_httponly, im using symfony. And where should i set it? i tried to set it in the same file where i used $session->start();

ini_set('session.cookie_httponly', 1);
class Class 
{
$session->start();
if (...){
...
$session->set('session', $someVar);
}
}

Was it right?

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *