Set expiration for nette-browser cookie

3 years ago

joska
Member | 25
+
0
-

Hello,

is there a way to set expiration date for nette-browser cookie without changing the Nette\Http object?

I understand that it is somewhat pointless since it's doing no harm, but one of our projects is required to meet strict corporate standards which allow only specific session cookies to exists without the Expire tag.

While we are trying to get exception for this case, any ideas how to achieve this?

Thank you.

3 years ago

David Grudl
Nette Core | 6847
+
0
-

You can delete cookie via $httpResponse->deleteCookie('nette-browser') after session is started.