X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=lib%2FNDWeb%2FController%2FRoot.pm;h=682448cee4365eb59f578c067dc7bfe665f81afd;hb=15e271f8e65bfc35d311f9b9cad581e3a1c70def;hp=d337a297ead91a306a7f7acda5a4b138a106b08d;hpb=87a1c9abbaa5f843130fe7bfced282685c0a513a;p=ndwebbie.git diff --git a/lib/NDWeb/Controller/Root.pm b/lib/NDWeb/Controller/Root.pm index d337a29..682448c 100644 --- a/lib/NDWeb/Controller/Root.pm +++ b/lib/NDWeb/Controller/Root.pm @@ -61,7 +61,7 @@ sub login : Local { ,$country,$c->sessionid,$remember); my $ref = $c->req->referer; - $ref =~ s/^http:/https:/; + $ref =~ s/^http:/https:/ unless $c->debug; $c->res->redirect($ref); return; } @@ -119,16 +119,17 @@ sub listAlliances : Private { $c->stash(alliances => \@alliances); } +sub sslurl { + return $_[0]; +} + sub auto : Private { my ($self, $c) = @_; my $dbh = $c ->model; $c->stash(dbh => $dbh); - $c->stash(sslurl => sub { - $_[0]->scheme('https') unless $c->debug; - return $_[0]; - }); + $c->stash(sslurl => \&sslurl); $dbh->do(q{SET timezone = 'GMT'});