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 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.