enable SSI
[scpubgit/App-SCS.git] / lib / App / SCS / Plugin / Generate / StaticServer.pm
index e31b773..bdb3ec1 100644 (file)
@@ -16,17 +16,20 @@ sub _build__dir_handler {
   );
 }
 
-has _static_handler => (is => 'lazy');
-
-sub _build__static_handler {
+has _static_handler => (is => 'lazy', builder => sub {
   my ($self) = @_;
   use_module('Plack::App::File')->new(
     root => $self->app->share_dir->catdir('static')
   );
-}
+});
+
+has _ssi_handler => (is => 'lazy', builder => sub {
+  use_module('Plack::Middleware::SSI')->new
+});
 
 sub dispatch_request {
   my ($self) = @_;
+  sub { $self->_ssi_handler },
   sub (/**.*) {
     my $path = $_[1];
     return unless $path =~ s/(?=\/|^)-//;