thanks, stefan. This will do if need be, but I was hoping there was a way to tell the app the cookie method right from start, rather than sticking this into each and every url.
---- Ivo Welch ([email protected]) http://www.ivo-welch.info/ J. Fred Weston Distinguished Professor of Finance Anderson School at UCLA, C524 Free Finance Textbook, http://book.ivo-welch.info/ Exec Editor, Critical Finance Review, http://www.critical-finance-review.org/ Editor and Publisher, FAMe, http://www.fame-jagazine.com/ On Thu, Apr 27, 2017 at 12:53 PM, Stefan Adams <[email protected]> wrote: > > On Thu, Apr 27, 2017 at 11:58 AM, iaw4 <[email protected]> wrote: > >> app->secret( [ 'you', 'me', 'us' ] ); >> app->sessions->cookie_domain( getfinaltwo( $self->req->url->to_abs->host >> ) ); >> app->start(); >> > > get '/' => sub { > my $c = shift; > $c->app->sessions->cookie_domain(getfinaltwo($c->req-> > url->to_abs->host)); > $c->session(a=>1)->render(text=>"\n"); > }; > app->start; > sub getfinaltwo { shift =~ s!^.*?((\.[^\.]+){2})$!$1!r } > > > *$ env MOJO_LOG_LEVEL=info perl /tmp/cookie get -v -H 'Host: > auth.syllabus.space' /* > GET / HTTP/1.1 > Host: auth.syllabus.space > Accept-Encoding: gzip > User-Agent: Mojolicious (Perl) > Content-Length: 0 > > HTTP/1.1 200 OK > Server: Mojolicious (Perl) > Set-Cookie: mojolicious=eyJhIjoxLCJleHBpcmVzIjoxNDkzMzI2MzU2fQ---- > f04ee710665cef6c7380dd579a21efae3fcde802; expires=Thu, 27 Apr 2017 > 20:52:36 GMT; *domain=.syllabus.space*; path=/; HttpOnly > Content-Type: text/html;charset=UTF-8 > Date: Thu, 27 Apr 2017 19:52:36 GMT > Content-Length: 1 > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Mojolicious" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/mojolicious/r6XS1Tc2OM8/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/mojolicious. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/d/optout.
