Skip to content

Commit

Permalink
Rely on default Plack staff resolver by default in app.psgi
Browse files Browse the repository at this point in the history
  • Loading branch information
ctfliblime committed Jul 2, 2011
1 parent 4d45603 commit 012e6bd
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions app.psgi
Expand Up @@ -7,17 +7,12 @@ use Koha::Plack::Util;

my $app = Plack::App::CGIBin->new(root => $ENV{PERL5LIB})->to_app;

sub is_staff {
my $hostname = Koha::Plack::Util::GetCanonicalHostname(shift);
return $hostname =~ /-staff\./;
}

builder {
enable 'Deflater';
enable 'Static', path => qr{^/opac-tmpl/}, root => 'koha-tmpl/';
enable 'Static', path => qr{^/intranet-tmpl/}, root => 'koha-tmpl/';
enable '+Koha::Plack::Localize';
enable '+Koha::Plack::Rewrite', staff_resolver => \&is_staff;
enable '+Koha::Plack::Rewrite';
enable '+Koha::Plack::ScrubStatus';

mount '/' => $app;
Expand Down

0 comments on commit 012e6bd

Please sign in to comment.