Skip to content

Commit

Permalink
show how to create a secure cookie
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Apr 8, 2015
1 parent b219f63 commit eaedce5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Mojolicious/Controller.pm
Expand Up @@ -467,6 +467,9 @@ the last one, you can use L</"every_cookie">.
# Create response cookie with domain and expiration date
$c->cookie(user => 'sri', {domain => 'example.com', expires => time + 60});
# Create secure response cookie
$c->cookie(secret => 'I <3 Mojolicious', {secure => 1, httponly => 1});
=head2 every_cookie
my $values = $c->every_cookie('foo');
Expand Down

0 comments on commit eaedce5

Please sign in to comment.