make authN hook more liberal in path check

This commit is contained in:
Oliver Gorwits
2012-01-18 14:57:22 +00:00
parent 646b2e0ba2
commit 59016ee6af

View File

@@ -6,7 +6,7 @@ use Dancer::Plugin::DBIC;
use Digest::MD5 ();
hook 'before' => sub {
if (! session('user') && request->path !~ m{^/login}) {
if (! session('user') && request->path !~ m{/login$}) {
if (setting('environment') eq 'development' and setting('no_auth')) {
session(user => 'developer');
}