Added header for use during dev
This commit is contained in:
parent
3a08894641
commit
b6064cc985
1 changed files with 3 additions and 3 deletions
|
@ -2,7 +2,6 @@ package Pear::LocalLoop;
|
|||
|
||||
use Mojo::Base 'Mojolicious';
|
||||
use Data::UUID;
|
||||
use Devel::Dwarn;
|
||||
use Mojo::JSON;
|
||||
use Data::Dumper;
|
||||
use Email::Valid;
|
||||
|
@ -34,8 +33,6 @@ my $sessionTimeSeconds = 60 * 60 * 24 * 7; #1 week.
|
|||
my $sessionTokenJsonName = 'sessionToken';
|
||||
my $sessionExpiresJsonName = 'sessionExpires';
|
||||
|
||||
Dwarn $config;
|
||||
|
||||
# shortcut for use in template
|
||||
$self->helper( db => sub { $dbh });
|
||||
$self->helper( schema => sub { $schema });
|
||||
|
@ -71,6 +68,9 @@ $r->any( '/' => sub {
|
|||
$self->hook( before_dispatch => sub {
|
||||
my $self = shift;
|
||||
|
||||
$self->app->log->debug('Before Dispatch');
|
||||
$self->res->headers->header('Access-Control-Allow-Origin' => '*') if $self->app->mode eq 'development';
|
||||
|
||||
$self->remove_all_expired_sessions();
|
||||
|
||||
#See if logged in.
|
||||
|
|
Reference in a new issue