[dancer-users] Add a cookie and redirect
Andrew Beverley
andy at andybev.com
Thu Aug 4 22:19:12 BST 2016
On Thu, 4 Aug 2016 13:52:15 Amelia Ireland <aireland at lbl.gov> wrote:
> my $c = Dancer2::Core::Cookie->new(
> name => 'return_to',
> value => '/',
> domain => config->{sso_domain},
> expires => '5 mins'
> );
>
> push_response_header 'Set-Cookie' => $c->to_header;
You're probably best just using the cookie keyword:
cookie return_to => '/', expires => ..., domain => ...
That said, using a cookie to set a redirect seems unnecessary. Can't
you just put it in the redirect URL?
Andy
More information about the dancer-users
mailing list