]> ruin.nu Git - ndwebbie.git/blobdiff - lib/NDWeb/Controller/Root.pm
Allow non-ssl for anonymous browsing
[ndwebbie.git] / lib / NDWeb / Controller / Root.pm
index 3eaaf0d009b254d61892ddc9c8b84eb7de0839d5..a7a59de1bc07e08e6f107a9f6df78081f6493fd1 100644 (file)
@@ -123,6 +123,11 @@ sub auto : Private {
 
        $c->stash(dbh => $dbh);
 
+       $c->stash(sslurl => sub {
+                       $_[0]->scheme('https') unless $c->debug;
+                       return $_[0];
+               });
+
        $dbh->do(q{SET timezone = 'GMT'});
 
        $c->stash(TICK =>$dbh->selectrow_array('SELECT tick()',undef));